aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DependentDiagnostic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DependentDiagnostic.h')
-rw-r--r--include/clang/AST/DependentDiagnostic.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/AST/DependentDiagnostic.h b/include/clang/AST/DependentDiagnostic.h
index 63047ec4db84..8e038c83c989 100644
--- a/include/clang/AST/DependentDiagnostic.h
+++ b/include/clang/AST/DependentDiagnostic.h
@@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H
-#define LLVM_CLANG_AST_DEPENDENT_DIAGNOSTIC_H
+#ifndef LLVM_CLANG_AST_DEPENDENTDIAGNOSTIC_H
+#define LLVM_CLANG_AST_DEPENDENTDIAGNOSTIC_H
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclContextInternals.h"
@@ -178,7 +178,8 @@ inline DeclContext::ddiag_range DeclContext::ddiags() const {
= static_cast<DependentStoredDeclsMap*>(getPrimaryContext()->getLookupPtr());
if (!Map)
- return ddiag_range();
+ // Return an empty range using the always-end default constructor.
+ return ddiag_range(ddiag_iterator(), ddiag_iterator());
return ddiag_range(ddiag_iterator(Map->FirstDiagnostic), ddiag_iterator());
}