builds. Sheesh.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152279
91177308-0d34-0410-b5e6-
96231b3b80d8
void configure();
// Sanity checks.
- void sanity() const;
+ void sanityImpl() const;
+
+ void sanity() const {
+#ifndef NDEBUG
+ sanityImpl();
+#endif
+ }
bool sanityCheckUnresolved() const {
for (iterator I = begin(), E = end(); I != E; ++I)
}
}
-void LookupResult::sanity() const {
+void LookupResult::sanityImpl() const {
+ // Note that this function is never called by NDEBUG builds. See
+ // LookupResult::sanity().
assert(ResultKind != NotFound || Decls.size() == 0);
assert(ResultKind != Found || Decls.size() == 1);
assert(ResultKind != FoundOverloaded || Decls.size() > 1 ||