diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-10-20 00:04:40 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-10-20 00:04:40 +0000 |
commit | a4a9334a5013aa3984ef9713f1a91ff70451d2f3 (patch) | |
tree | e786857bc2ce6c398605d8aa220ea6ecd0502ffe /clang/lib | |
parent | 0b4a59fc0797e9b8e67a7b369ded4563f53b43c4 (diff) | |
download | bcm5719-llvm-a4a9334a5013aa3984ef9713f1a91ff70451d2f3.tar.gz bcm5719-llvm-a4a9334a5013aa3984ef9713f1a91ff70451d2f3.zip |
Builtin candidate minimization for
<<=, >>= and the rest.
llvm-svn: 84568
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 44c3e2dd3f6..2d5a86b7b18 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -3710,12 +3710,13 @@ Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, // Add this built-in operator as a candidate (VQ is empty). ParamTypes[0] = Context.getLValueReferenceType(ArithmeticTypes[Left]); AddBuiltinCandidate(ParamTypes[0], ParamTypes, Args, 2, CandidateSet); - - // Add this built-in operator as a candidate (VQ is 'volatile'). - ParamTypes[0] = ArithmeticTypes[Left]; - ParamTypes[0] = Context.getVolatileType(ParamTypes[0]); - ParamTypes[0] = Context.getLValueReferenceType(ParamTypes[0]); - AddBuiltinCandidate(ParamTypes[0], ParamTypes, Args, 2, CandidateSet); + if (VisibleTypeConversionsQuals.hasVolatile()) { + // Add this built-in operator as a candidate (VQ is 'volatile'). + ParamTypes[0] = ArithmeticTypes[Left]; + ParamTypes[0] = Context.getVolatileType(ParamTypes[0]); + ParamTypes[0] = Context.getLValueReferenceType(ParamTypes[0]); + AddBuiltinCandidate(ParamTypes[0], ParamTypes, Args, 2, CandidateSet); + } } } break; |