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 | ca90ecdb72cee5530cca55079c9688cd2e446f09 (patch) | |
tree | 4ea47d7ecfed4c89bfecc05c487f67ef6c003670 /clang/lib/Sema/AnalysisBasedWarnings.cpp | |
parent | 2461d8a6d5f7f05857719893289bc8595274fe25 (diff) | |
download | bcm5719-llvm-ca90ecdb72cee5530cca55079c9688cd2e446f09.tar.gz bcm5719-llvm-ca90ecdb72cee5530cca55079c9688cd2e446f09.zip |
Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussion on cfe-dev.
llvm-svn: 167662
Diffstat (limited to 'clang/lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | clang/lib/Sema/AnalysisBasedWarnings.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp index 5c21ea4867b..a20817f9650 100644 --- a/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/clang/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()); |