Simplify code for skipping diagnostics in system headers.
commit80484b1dc369ea7ed6ae946d5b74ab88b71afc45
authordcheng <dcheng@chromium.org>
Sat, 9 May 2015 18:39:43 +0000 (9 11:39 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 9 May 2015 18:40:19 +0000 (9 18:40 +0000)
tree2879c26d8d4aa3cdef7c55e50109c9a42904aefc
parent43774685cfa523cd64cf655ec4b39074055bf663
Simplify code for skipping diagnostics in system headers.

This patch adds a small DiagnosticBuilder wrapper, so plugin checks that
use the spelling location of a token can simply use the helper instead
of having to nest the diagnostic inside an additional if.

BUG=483128

Review URL: https://codereview.chromium.org/1135843002

Cr-Commit-Position: refs/heads/master@{#329050}
tools/clang/plugins/FindBadConstructsConsumer.cpp
tools/clang/plugins/FindBadConstructsConsumer.h
tools/clang/plugins/SuppressibleDiagnosticBuilder.h [new file with mode: 0644]