
GNU line marker directives are not recognised when preprocessing assembly files, meaning they can't be used in the predefines file meaning macros defined on the command line are reported as being built-in. Change this to permit line markers but only in the predefines file, so we can correctly report command line macros as coming from the command line. Differential Revision: https://reviews.llvm.org/D145397
11 lines
404 B
ArmAsm
11 lines
404 B
ArmAsm
// RUN: %clang %s -E -DCLI_MACRO=1 2>&1 | FileCheck %s
|
|
|
|
#define CLI_MACRO
|
|
// CHECK: macro_redefined.S{{.+}}: warning: 'CLI_MACRO' macro redefined
|
|
// CHECK: <command line>{{.+}}: note: previous definition is here
|
|
|
|
#define REGULAR_MACRO
|
|
#define REGULAR_MACRO 1
|
|
// CHECK: macro_redefined.S{{.+}}: warning: 'REGULAR_MACRO' macro redefined
|
|
// CHECK: macro_redefined.S{{.+}}: note: previous definition is here
|