diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-14 20:01:51 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-14 20:01:51 +0000 |
commit | 7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6 (patch) | |
tree | 9032dde826e1c97f94f43e4a6c351de2736b1185 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 3f39123d15ba5e145ce81c63ea7e03c72c3b4f8f (diff) | |
download | llvm-7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6.zip llvm-7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6.tar.gz llvm-7fa2b74e988e8da6a1d0c27d4c6567f26aec03e6.tar.bz2 |
Use getOperatorSpelling to get the spelling of an overloaded operator
rather than duplicating operator name tables in multiple places.
llvm-svn: 363446
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index d2e7766..7770f34 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -5532,9 +5532,10 @@ void Sema::CodeCompleteOperatorName(Scope *S) { &ResultBuilder::IsType); Results.EnterNewScope(); - // Add the names of overloadable operators. + // Add the names of overloadable operators. Note that OO_Conditional is not + // actually overloadable. #define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) \ - if (std::strcmp(Spelling, "?")) \ + if (OO_##Name != OO_Conditional) \ Results.AddResult(Result(Spelling)); #include "clang/Basic/OperatorKinds.def" |