]> granicus.if.org Git - clang/commit
Fix off-by-one error in #pragma clang system_header.
authorJordan Rose <jordan_rose@apple.com>
Wed, 17 Apr 2013 19:09:18 +0000 (19:09 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 17 Apr 2013 19:09:18 +0000 (19:09 +0000)
commit142b35e25b579e2a883d6ca37c3c1121f562f242
tree1c63dfe94854deaac1a487b63654734f6d609bed
parent987c03085558277a5fe8cef8e1b628cabcc626dc
Fix off-by-one error in #pragma clang system_header.

The system_header pragma (from GCC) is implemented using line notes in the
source manager. However, a line note's line number specifies the number
not for the current line, but for the next line. This was making all
line numbers appear off by one after the pragma.

Reported by Andy Gibbs, uncovered during r179677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179709 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/PrintPreprocessedOutput.cpp
lib/Lex/Pragma.cpp
test/Preprocessor/pragma_sysheader.c