]> granicus.if.org Git - clang/commitdiff
Fix a (slightly weird) 'comma operator within array index expression' warning on...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 10 Oct 2017 13:56:17 +0000 (13:56 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 10 Oct 2017 13:56:17 +0000 (13:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315314 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 29051ebeefcab08693aa8b2bbf21e290fd528b8c..82bf6e157bb28357f97564ee2835c1a2c193842a 100644 (file)
@@ -5728,7 +5728,8 @@ void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {
 
       // 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