r315314 - Fix a (slightly weird) 'comma operator within array index expression' warning on VS builds. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 10 06:56:17 PDT 2017
Author: rksimon
Date: Tue Oct 10 06:56:17 2017
New Revision: 315314
URL: http://llvm.org/viewvc/llvm-project?rev=315314&view=rev
Log:
Fix a (slightly weird) 'comma operator within array index expression' warning on VS builds. NFCI.
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=315314&r1=315313&r2=315314&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Oct 10 06:56:17 2017
@@ -5728,7 +5728,8 @@ void ASTReader::ReadPragmaDiagnosticMapp
// Preserve the property that the imaginary root file describes the
// current state.
- auto &T = Diag.DiagStatesByLoc.Files[FileID()].StateTransitions;
+ FileID NullFile;
+ auto &T = Diag.DiagStatesByLoc.Files[NullFile].StateTransitions;
if (T.empty())
T.push_back({CurState, 0});
else
More information about the cfe-commits
mailing list