// it's actually the start of a preprocessing directive. Callback to
// the preprocessor to handle it.
// FIXME: -fpreprocessed mode??
- if (Result.isAtStartOfLine() && !LexingRawMode) {
+ if (Result.isAtStartOfLine() && !LexingRawMode && !Is_PragmaLexer) {
FormTokenWithChars(Result, CurPtr, tok::hash);
PP->HandleDirective(Result);
// it's actually the start of a preprocessing directive. Callback to
// the preprocessor to handle it.
// FIXME: -fpreprocessed mode??
- if (Result.isAtStartOfLine() && !LexingRawMode) {
+ if (Result.isAtStartOfLine() && !LexingRawMode && !Is_PragmaLexer) {
FormTokenWithChars(Result, CurPtr, tok::hash);
PP->HandleDirective(Result);
-// RUN: clang-cc %s -E -verify
+// RUN: clang-cc %s -verify -Wall
_Pragma ("GCC system_header") // expected-warning {{system_header ignored in main file}}
+// rdar://6880630
+_Pragma("#define macro") // expected-warning {{unknown pragma ignored}}
+
+#ifdef macro
+#error #define invalid
+#endif