aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-05-24 07:43:19 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-05-24 07:43:19 +0000
commit1f8f2d52ff3712770a49f318a687b0c8b0ada9d0 (patch)
tree5608ad9a3f055215aceab4f229602f6612c312fe /lib/Sema/SemaCXXCast.cpp
parent74a5fd8bcc68b540b58f6fcd2d80e6e926966e71 (diff)
Fix a bug in -Wundefined-reinterpret-cast where we failed to look
through sugared types when testing for TagTypes. This was the actual cause of the only false positive in Clang+LLVM. Next evaluation will be over a much larger selection of code including large amounts of open source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXCast.cpp')
-rw-r--r--lib/Sema/SemaCXXCast.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp
index c7038322e1..32fd0be375 100644
--- a/lib/Sema/SemaCXXCast.cpp
+++ b/lib/Sema/SemaCXXCast.cpp
@@ -1330,7 +1330,7 @@ void Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType,
return;
}
// or one of the types is a tag type.
- if (isa<TagType>(SrcTy) || isa<TagType>(DestTy)) {
+ if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) {
return;
}