
When using `-dD` to generate a preprocessed output, the `#define` directives are preserved. This includes built-in and command-line definitions. Before, clang would warn for reserved identifiers for serialized built-in and command-line definitions. This patch adds an exception to these cases.
12 lines
363 B
OpenEdge ABL
12 lines
363 B
OpenEdge ABL
// RUN: %clang_cc1 -fsyntax-only -verify -x cpp-output %s
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic warning "-Wreserved-macro-identifier"
|
|
# 1 "<built-in>" 1
|
|
#define __BUILTIN__
|
|
# 2 "<command line>" 1
|
|
#define __CMD__
|
|
# 3 "biz.cpp" 1
|
|
#define __SOME_FILE__ // expected-warning {{macro name is a reserved identifier}}
|
|
int v;
|
|
#pragma clang diagnostic pop
|