summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2010-08-10 08:50:03 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2010-08-10 08:50:03 +0000
commit092990ac68670d39e99bcb91e22107699f63aa78 (patch)
tree34246451d46ed27da3b6d2120907c69568e2d339 /clang/lib/Sema/SemaExpr.cpp
parente03edfd3e7d883bb671fb3cd5ca94ffb470e5cfa (diff)
downloadbcm5719-llvm-092990ac68670d39e99bcb91e22107699f63aa78.tar.gz
bcm5719-llvm-092990ac68670d39e99bcb91e22107699f63aa78.zip
Added TypeLocs to TypesCompatibleExpr node.
llvm-svn: 110663
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index d573ca9bbbd..e5a50656874 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -7019,12 +7019,21 @@ Sema::OwningExprResult Sema::ActOnBuiltinOffsetOf(Scope *S,
Sema::OwningExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
TypeTy *arg1,TypeTy *arg2,
SourceLocation RPLoc) {
- // FIXME: Preserve type source info.
- QualType argT1 = GetTypeFromParser(arg1);
- QualType argT2 = GetTypeFromParser(arg2);
+ TypeSourceInfo *argTInfo1;
+ QualType argT1 = GetTypeFromParser(arg1, &argTInfo1);
+ TypeSourceInfo *argTInfo2;
+ QualType argT2 = GetTypeFromParser(arg2, &argTInfo2);
assert((!argT1.isNull() && !argT2.isNull()) && "Missing type argument(s)");
+ return BuildTypesCompatibleExpr(BuiltinLoc, argTInfo1, argTInfo2, RPLoc);
+}
+
+Sema::OwningExprResult
+Sema::BuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
+ TypeSourceInfo *argTInfo1,
+ TypeSourceInfo *argTInfo2,
+ SourceLocation RPLoc) {
if (getLangOptions().CPlusPlus) {
Diag(BuiltinLoc, diag::err_types_compatible_p_in_cplusplus)
<< SourceRange(BuiltinLoc, RPLoc);
@@ -7032,9 +7041,10 @@ Sema::OwningExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
}
return Owned(new (Context) TypesCompatibleExpr(Context.IntTy, BuiltinLoc,
- argT1, argT2, RPLoc));
+ argTInfo1, argTInfo2, RPLoc));
}
+
Sema::OwningExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc,
ExprArg cond,
ExprArg expr1, ExprArg expr2,
OpenPOWER on IntegriCloud