aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-14 04:19:29 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-14 04:19:29 +0000
commit00aae5243d965aa7bcee81a39ba0900c7869be21 (patch)
treefe92ea756d6de9e66fc3a726a53983e68e68fb73 /lib/Basic/Diagnostic.cpp
parentb27660a733d420967371bbf578a75db21116895c (diff)
Fix undefined behavior: don't bind a dereferenced null pointer to a reference.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r--lib/Basic/Diagnostic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 60feb75c1c..e68950200f 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -119,7 +119,7 @@ void DiagnosticsEngine::Reset() {
// Create a DiagState and DiagStatePoint representing diagnostic changes
// through command-line.
DiagStates.push_back(DiagState());
- PushDiagStatePoint(&DiagStates.back(), SourceLocation());
+ DiagStatePoints.push_back(DiagStatePoint(&DiagStates.back(), FullSourceLoc()));
}
void DiagnosticsEngine::SetDelayedDiagnostic(unsigned DiagID, StringRef Arg1,