projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0259417
)
Merge isVectorType() and getAs<VectorType> calls to silence clang static analyzer...
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 13 Jan 2020 14:54:02 +0000
(14:54 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 13 Jan 2020 15:07:56 +0000
(15:07 +0000)
clang/lib/AST/ASTDiagnostic.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/ASTDiagnostic.cpp
b/clang/lib/AST/ASTDiagnostic.cpp
index
8ff3ceb
..
c241041
100644
(file)
--- a/
clang/lib/AST/ASTDiagnostic.cpp
+++ b/
clang/lib/AST/ASTDiagnostic.cpp
@@
-300,8
+300,7
@@
ConvertTypeToDiagnosticString(ASTContext &Context, QualType Ty,
// Give some additional info on vector types. These are either not desugared
// or displaying complex __attribute__ expressions so add details of the
// type and element count.
- if (Ty->isVectorType()) {
- const VectorType *VTy = Ty->getAs<VectorType>();
+ if (const auto *VTy = Ty->getAs<VectorType>()) {
std::string DecoratedString;
llvm::raw_string_ostream OS(DecoratedString);
const char *Values = VTy->getNumElements() > 1 ? "values" : "value";