[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-04 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Basic/Diagnostic.cpp:179 + + // 2nd most frequent case: L is before the first diag state change. + FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc; rsmith wrote: > djasper wrote: > > rsmith wrote: > > >

[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-04 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Diagnostic.cpp:179 + + // 2nd most frequent case: L is before the first diag state change. + FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc; djasper wrote: > rsmith wrote: > > It's surprising to me

[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-03 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Basic/Diagnostic.cpp:179 + + // 2nd most frequent case: L is before the first diag state change. + FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc; rsmith wrote: > It's surprising to me that this would b

[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-02 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Diagnostic.cpp:179 + + // 2nd most frequent case: L is before the first diag state change. + FullSourceLoc FirstStateChangePos = DiagStatePoints[1].Loc; It's surprising to me that this would be particularly fr

[PATCH] D28207: Add second fast path for DiagnosticsEngine::GetDiagStatePointForLoc

2017-01-01 Thread Daniel Jasper via Phabricator via cfe-commits
djasper created this revision. djasper added a reviewer: rsmith. djasper added a subscriber: cfe-commits. Herald added a subscriber: sanjoy. In many translation units I have tested, many of the calls to DiagnosticsEngine::GetDiagStatePointForLoc are for source locations before the first diag sta