diff options
| author | Douglas Gregor <dgregor@apple.com> | 2008-11-21 15:30:19 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2008-11-21 15:30:19 +0000 |
| commit | 9eb16eadfb62ee267eb5614fec40de351a670b79 (patch) | |
| tree | cb3926f787511f2c8820408bc6b94fca14898c2f /clang | |
| parent | 4bce2bff8849e2ec61bb080bd224f7c465a39d42 (diff) | |
| download | bcm5719-llvm-9eb16eadfb62ee267eb5614fec40de351a670b79.tar.gz bcm5719-llvm-9eb16eadfb62ee267eb5614fec40de351a670b79.zip | |
Enable some more operator overloading tests, and don't look into an identifier for functions that might not have one
llvm-svn: 59818
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 3 | ||||
| -rw-r--r-- | clang/test/SemaCXX/overloaded-builtin-operators.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index e9d5eb75ea4..2e13352a5ad 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -168,6 +168,9 @@ unsigned CallExpr::isBuiltinCall() const { if (!FDecl) return 0; + if (!FDecl->getIdentifier()) + return 0; + return FDecl->getIdentifier()->getBuiltinID(); } diff --git a/clang/test/SemaCXX/overloaded-builtin-operators.cpp b/clang/test/SemaCXX/overloaded-builtin-operators.cpp index 41509f96e77..284bdb8d308 100644 --- a/clang/test/SemaCXX/overloaded-builtin-operators.cpp +++ b/clang/test/SemaCXX/overloaded-builtin-operators.cpp @@ -89,14 +89,10 @@ struct ConstIntPtrRef { void test_with_ptrs(VolatileIntPtr vip, ConstIntPtr cip, ShortRef sr, VolatileIntPtrRef vipr, ConstIntPtrRef cipr) { -#if 0 - // FIXME: Enable these tests once we have operator overloading for - // operator[]. const int& cir1 = cip[sr]; const int& cir2 = sr[cip]; volatile int& vir1 = vip[sr]; volatile int& vir2 = sr[vip]; -#endif bool b1 = (vip == cip); long p1 = vip - cip; |

