summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 02:49:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 02:49:47 +0000
commit685cef649956948eabca83c3483c8e4e8f990550 (patch)
treeb3112ed2a07cdfb3cd4a8a062c4212c7e2eccd3a /clang/lib/Sema/SemaDecl.cpp
parent59de94bd4e1c5af38a2694614be6df9c19d21248 (diff)
downloadbcm5719-llvm-685cef649956948eabca83c3483c8e4e8f990550.tar.gz
bcm5719-llvm-685cef649956948eabca83c3483c8e4e8f990550.zip
PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension. llvm-svn: 173758
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index e8d14e6befb..9c3666413ba 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -6647,7 +6647,8 @@ void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) {
const PointerType* PT;
if ((PT = qs.strip(AT)->getAs<PointerType>()) &&
(PT = qs.strip(PT->getPointeeType())->getAs<PointerType>()) &&
- (QualType(qs.strip(PT->getPointeeType()), 0) == Context.CharTy)) {
+ Context.hasSameType(QualType(qs.strip(PT->getPointeeType()), 0),
+ Context.CharTy)) {
qs.removeConst();
mismatch = !qs.empty();
}
OpenPOWER on IntegriCloud