diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-11-10 04:03:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-11-10 04:03:41 +0000 |
commit | 3e7735183b00798efccdee82b9b64b00ef3cd684 (patch) | |
tree | a2f4a52f65f69019ebe8259469638ddbf85bb77c /lib/Sema/AnalysisBasedWarnings.cpp | |
parent | 6c801b66fed0da4ab9bb6a7967bffc7e7d9ea970 (diff) |
Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussion on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index 5c21ea4867..a20817f965 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -818,19 +818,6 @@ namespace { static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC, bool PerFunction) { - // Only perform this analysis when using C++. There is no good workflow - // for this warning when using straight C. There is no good way to silence - // the warning (no attribute is available) unless we are using C++11's support - // for generalized attributes. Once could use pragmas to silence the warning, - // but as a general solution that is gross and not in the spirit of this - // warning. - // - // NOTE: this argument also applies to C++ code not using C++11, as the - // generalized attributes are not available in earlier C++ dialects. - // This will require some discussion. - if (!AC.getASTContext().getLangOpts().CPlusPlus) - return; - FallthroughMapper FM(S); FM.TraverseStmt(AC.getBody()); |