[cfe-commits] r88811 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/SemaCXX/overloaded-builtin-operators.cpp
Anders Carlsson
andersca at mac.com
Sat Nov 14 13:26:42 PST 2009
Author: andersca
Date: Sat Nov 14 15:26:41 2009
New Revision: 88811
URL: http://llvm.org/viewvc/llvm-project?rev=88811&view=rev
Log:
Always build a builtin operator expression for the __extension__ unary operator.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=88811&r1=88810&r2=88811&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Nov 14 15:26:41 2009
@@ -5711,7 +5711,8 @@
UnaryOperator::Opcode Opc,
ExprArg input) {
Expr *Input = (Expr*)input.get();
- if (getLangOptions().CPlusPlus && Input->getType()->isOverloadableType()) {
+ if (getLangOptions().CPlusPlus && Input->getType()->isOverloadableType() &&
+ Opc != UnaryOperator::Extension) {
// Find all of the overloaded operators visible from this
// point. We perform both an operator-name lookup from the local
// scope and an argument-dependent lookup based on the types of
Modified: cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp?rev=88811&r1=88810&r2=88811&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp (original)
+++ cfe/trunk/test/SemaCXX/overloaded-builtin-operators.cpp Sat Nov 14 15:26:41 2009
@@ -185,3 +185,6 @@
return a[X][X];
}
+void f() {
+ (void)__extension__(A());
+}
More information about the cfe-commits
mailing list