summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
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
commitf995f2ce7cfcded82f58fa36815e863adf2cb3a0 (patch)
treeb2c5fbb373269e6b0c9db102fb53474a98884387 /clang/lib/Basic
parentf44b8ee52eeaf6e306afd73d0f44381cec88cec6 (diff)
downloadbcm5719-llvm-f995f2ce7cfcded82f58fa36815e863adf2cb3a0.tar.gz
bcm5719-llvm-f995f2ce7cfcded82f58fa36815e863adf2cb3a0.zip
Fix undefined behavior: don't bind a dereferenced null pointer to a reference.
No functionality change. llvm-svn: 161832
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 60feb75c1ce..e68950200fd 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud