From a923fb2b3b009ff7a6c516f54c401c5fb533bc0c Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 29 May 2011 07:32:14 +0000 Subject: Fix a regression in the source locations for unary trait expressions. I tried to use an assert to prove that I could remove each of the arguments I did, but ended up writing my assert with inverted logic. Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source locations and ranges for these using -ast-dump. I tried writing a test case that would catch these, but these expressions aren't exposed in the c-index-test's token annotation utility. llvm-svn: 132284 --- clang/lib/Sema/TreeTransform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/TreeTransform.h') diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 2bf3c228c49..1473ae5ac2b 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1378,7 +1378,7 @@ public: UnaryExprOrTypeTrait ExprKind, SourceRange R) { ExprResult Result - = getSema().CreateUnaryExprOrTypeTraitExpr(SubExpr, ExprKind); + = getSema().CreateUnaryExprOrTypeTraitExpr(SubExpr, OpLoc, ExprKind); if (Result.isInvalid()) return ExprError(); -- cgit v1.2.3