[flang] Remove macro replacement in angular bracket includes

Addresses Github issue [[ https://github.com/llvm/llvm-project/issues/60317 | #60317 ]].

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D143469
This commit is contained in:
Ethan Luis McDonough
2023-02-18 01:56:15 -06:00
parent 5e262d58c4
commit 9ce8eb0fbc
2 changed files with 6 additions and 1 deletions

View File

@@ -599,7 +599,7 @@ void Preprocessor::Directive(const TokenSequence &dir, Prescanner &prescanner) {
"#include: expected '>' at end of included file"_port_en_US);
}
TokenSequence braced{dir, j + 1, k - j - 1};
include = ReplaceMacros(braced, prescanner).ToString();
include = braced.ToString();
j = k;
} else if ((include = dir.TokenAt(j).ToString()).substr(0, 1) == "\"" &&
include.substr(include.size() - 1, 1) == "\"") { // #include "foo"

View File

@@ -0,0 +1,5 @@
! RUN: %flang -E -I%S %s | FileCheck %s
#define empty ERR_NONEXISTENT
! CHECK-NOT: :5:
#include <empty.h>