summaryrefslogtreecommitdiff
path: root/include/clang/Basic/Diagnostic.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-07-22 02:56:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-07-22 02:56:56 +0000
commitcbc820af7193e3ad9c71fbe6e3c8bd3c1166e540 (patch)
tree1050f422d0bd67188a69ccb052df120f7d6f14f3 /include/clang/Basic/Diagnostic.h
parent9fa667388fc44bc269a5e82909c8ac1c177a500d (diff)
downloadclang-cbc820af7193e3ad9c71fbe6e3c8bd3c1166e540.tar.gz
clang-cbc820af7193e3ad9c71fbe6e3c8bd3c1166e540.tar.bz2
clang-cbc820af7193e3ad9c71fbe6e3c8bd3c1166e540.tar.xz
Implement DR257 / fix PR16659:
A constructor for an abstract class does not call constructors for virtual base classes, so it is not an error if no initializer is present for the virtual base and the virtual base cannot be default initialized. Also provide a (disabled by default, for now) warning for the case where a virtual base class's initializer is ignored in an abstract class's constructor, and address a defect in DR257 where it was not carried through to C++11's rules for implicit deletion of special member functions. Based on a patch by Maurice Bos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Diagnostic.h')
-rw-r--r--include/clang/Basic/Diagnostic.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index 1354120ea5..0fcfdf7cb3 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -490,7 +490,14 @@ public:
FatalErrorOccurred = true;
LastDiagLevel = DiagnosticIDs::Ignored;
}
-
+
+ /// \brief Determine whether the previous diagnostic was ignored. This can
+ /// be used by clients that want to determine whether notes attached to a
+ /// diagnostic will be suppressed.
+ bool isLastDiagnosticIgnored() const {
+ return LastDiagLevel == DiagnosticIDs::Ignored;
+ }
+
/// \brief Controls whether otherwise-unmapped extension diagnostics are
/// mapped onto ignore/warning/error.
///