summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/AnalysisBasedWarnings.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-06-24 15:28:21 +0000
committerAlexander Kornienko <alexfh@google.com>2014-06-24 15:28:21 +0000
commitbf91164f1c8690a9ab1804de8a50396bc57a90cb (patch)
tree44dea1c28d1e9e14b1e48f552114d6c41bcf1157 /clang/lib/Sema/AnalysisBasedWarnings.cpp
parent3b92c5bd41b5c75b6baae52904081f683d8a9718 (diff)
downloadbcm5719-llvm-bf91164f1c8690a9ab1804de8a50396bc57a90cb.tar.gz
bcm5719-llvm-bf91164f1c8690a9ab1804de8a50396bc57a90cb.zip
Fix "warning: fallthrough annotation does not directly precede switch label" in lambdas.
Summary: This patch fixes http://llvm.org/PR17864 - "warning: fallthrough annotation does not directly precede switch label" in lambdas. Reviewers: rsmith Reviewed By: rsmith Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4258 llvm-svn: 211599
Diffstat (limited to 'clang/lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r--clang/lib/Sema/AnalysisBasedWarnings.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index 0e522dc4157..c4524cde93a 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -1025,6 +1025,9 @@ namespace {
// methods separately.
bool TraverseDecl(Decl *D) { return true; }
+ // We analyze lambda bodies separately. Skip them here.
+ bool TraverseLambdaBody(LambdaExpr *LE) { return true; }
+
private:
static const AttributedStmt *asFallThroughAttr(const Stmt *S) {
OpenPOWER on IntegriCloud