mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-06 21:51:08 +00:00
111c4a6b69
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. llvm-svn: 179709
14 lines
436 B
C
14 lines
436 B
C
// RUN: %clang_cc1 -verify -pedantic %s -fsyntax-only
|
|
// RUN: %clang_cc1 -E %s | FileCheck %s
|
|
// expected-no-diagnostics
|
|
// rdar://6899937
|
|
#include "pragma_sysheader.h"
|
|
|
|
|
|
// PR9861: Verify that line markers are not messed up in -E mode.
|
|
// CHECK: # 1 "{{.*}}pragma_sysheader.h" 1
|
|
// CHECK-NEXT: # 2 "{{.*}}pragma_sysheader.h" 3
|
|
// CHECK-NEXT: typedef int x;
|
|
// CHECK-NEXT: typedef int x;
|
|
// CHECK-NEXT: # 6 "{{.*}}pragma_sysheader.c" 2
|