]> granicus.if.org Git - clang/commitdiff
Microsoft's __uuidof operator returns a lvalue.
authorFrancois Pichet <pichet2000@gmail.com>
Fri, 17 Dec 2010 02:00:06 +0000 (02:00 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Fri, 17 Dec 2010 02:00:06 +0000 (02:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122021 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprClassification.cpp
test/Parser/MicrosoftExtensions.c

index 05d175c135a49cff46baca2bc69b8be7ff88605f..4cf393d788fdf90ac48e95555a6e481c0b7fa968 100644 (file)
@@ -303,7 +303,7 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) {
   }
       
   case Expr::CXXUuidofExprClass:
-    return Cl::CL_PRValue;
+    return Cl::CL_LValue;
   }
   
   llvm_unreachable("unhandled expression kind in classification");
index d90378136887a39004caf636b5773805a8c5d9d0..6c14742278e29177764c143e18c46c732ccc39fb 100644 (file)
@@ -77,6 +77,8 @@ void uuidof_test2()
    C c;
    // FIXME, this must not compile
   _uuidof(c);
+
+  &_uuidof(0);
 }
 
 /* Microsoft attribute tests */