summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-27 10:37:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-27 10:40:41 +0100
commitb61214c91d926ea56f2cae309469da588b3304b1 (patch)
tree9e2c99e3cfac09d4f6f9cb7f39107c916a301445 /compilerplugins
parentd1f31681623696e99b0bd9e98570cb1ebac518cc (diff)
Remove dynamic exception specifications from !LIBO_INTERNAL_ONLY
...only odk/examples/ remains to be clean up Change-Id: I875a1e8d6750b6b007bd75126b8010273e1f32d5
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/dynexcspec.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/compilerplugins/clang/dynexcspec.cxx b/compilerplugins/clang/dynexcspec.cxx
index 7ca7ba0ac576..b06245e0ff03 100644
--- a/compilerplugins/clang/dynexcspec.cxx
+++ b/compilerplugins/clang/dynexcspec.cxx
@@ -21,7 +21,12 @@
namespace {
bool isOverriding(FunctionDecl const * decl) {
- return decl->hasAttr<OverrideAttr>();
+ if (decl->hasAttr<OverrideAttr>()) {
+ return true;
+ }
+ auto m = dyn_cast<CXXMethodDecl>(decl);
+ return m != nullptr
+ && m->begin_overridden_methods() != m->end_overridden_methods();
}
class DynExcSpec:
@@ -31,13 +36,6 @@ public:
explicit DynExcSpec(InstantiationData const & data): RewritePlugin(data) {}
void run() override {
- // See the mail thread mentioned above for why !LIBO_INTERNAL_ONLY is
- // excluded for now:
- if (!compiler.getPreprocessor().getIdentifierInfo("LIBO_INTERNAL_ONLY")
- ->hasMacroDefinition())
- {
- return;
- }
if (compiler.getLangOpts().CPlusPlus) {
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}