summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2020-01-01 17:23:19 +0100
committerMark de Wever <koraq@xs4all.nl>2020-01-01 20:02:00 +0100
commitf022a5a792fd39a4c33f49583d24d96c70177066 (patch)
tree44a323f5dcf3741d5b637aca780042929484d3ca /clang/lib/AST/Decl.cpp
parent8dc7b982b4556c243e0502e6e230bdd53ddd65ff (diff)
downloadbcm5719-llvm-f022a5a792fd39a4c33f49583d24d96c70177066.tar.gz
bcm5719-llvm-f022a5a792fd39a4c33f49583d24d96c70177066.zip
Adds fixit hints to the -Wrange-loop-analysis
Differential Revision: https://reviews.llvm.org/D68913
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 9f09898a957..6cfd4c2a2a2 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1820,6 +1820,12 @@ SourceLocation DeclaratorDecl::getTypeSpecStartLoc() const {
return SourceLocation();
}
+SourceLocation DeclaratorDecl::getTypeSpecEndLoc() const {
+ TypeSourceInfo *TSI = getTypeSourceInfo();
+ if (TSI) return TSI->getTypeLoc().getEndLoc();
+ return SourceLocation();
+}
+
void DeclaratorDecl::setQualifierInfo(NestedNameSpecifierLoc QualifierLoc) {
if (QualifierLoc) {
// Make sure the extended decl info is allocated.
OpenPOWER on IntegriCloud