aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-25 22:29:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-25 22:29:57 +0000
commitb2cb1cbd727469e1567a6f2535895e6b64e12c35 (patch)
tree643597bfc18435811b4b0d6c937cb6afe1dda1c0 /lib/Sema/Sema.h
parentdba6ef87a07f0cbab42b4aa98faaf4e6de8126d0 (diff)
When computing the composite pointer type for relational comparisons,
equality comparisons, and conditional operators, produce a composite pointer type with the appropriate additional "const" qualifiers if the pointer types would otherwise be incompatible. This is a small extension (also present in GCC and EDG in a slightly different form) that permits code like: void** i; void const** j; i == j; with the following extwarn: t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and 'void const **') uses non-standard composite pointer type 'void const *const *' [-pedantic] i == j; ~ ^ ~ Fixes PR6346, and I'll be filing a core issue about this with the C++ committee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.h')
-rw-r--r--lib/Sema/Sema.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 2ed4bf6297..42f9838785 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -3947,7 +3947,8 @@ public:
Expr *&cond, Expr *&lhs, Expr *&rhs, SourceLocation questionLoc);
QualType CXXCheckConditionalOperands( // C++ 5.16
Expr *&cond, Expr *&lhs, Expr *&rhs, SourceLocation questionLoc);
- QualType FindCompositePointerType(Expr *&E1, Expr *&E2); // C++ 5.9
+ QualType FindCompositePointerType(Expr *&E1, Expr *&E2,
+ bool *NonStandardCompositeType = 0);
QualType FindCompositeObjCPointerType(Expr *&LHS, Expr *&RHS,
SourceLocation questionLoc);