diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-05-24 07:43:19 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-05-24 07:43:19 +0000 |
commit | 0dc3f8db1a10d534a8b562d3db727261aa18931a (patch) | |
tree | 2434233fef61f35fbe4e3d1161ba69fa9a244a4b /clang/lib/Sema/SemaCXXCast.cpp | |
parent | 46e1ebf3676d300d9cad25e0aec15f2258c40b1b (diff) | |
download | bcm5719-llvm-0dc3f8db1a10d534a8b562d3db727261aa18931a.tar.gz bcm5719-llvm-0dc3f8db1a10d534a8b562d3db727261aa18931a.zip |
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.
llvm-svn: 131957
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCXXCast.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp index c7038322e1c..32fd0be375e 100644 --- a/clang/lib/Sema/SemaCXXCast.cpp +++ b/clang/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; } |