Does anybody know why the following lines
#pragma clang assume_nonnull begin
#pragma clang assume_nonnull end
are not preserved in preprocessed output?
Is this a bug or it was designed as such on purpose?
Zbigniew Sarbinowski (Zibi) C++ FE development
IBM z Systems Software, IBM Systems Unit
8200 Warden Ave. Markham ON, L6G 1C7
C2/712/8200/MKM Tel: 905-413-6071
Bug. There’s a small set of pragmas which are handled by the preprocessor itself, rather than the parser, for various reasons. See the complete set at Preprocessor::RegisterBuiltinPragmas. Some of them don’t need special handling (e.g. “#pragma once” only applies during preprocessing). For the ones that do need to be part of the output, we need special cases to handle them in lib/Frontend/PrintPreprocessedOutput.cpp. -Eli
-----“Friedman, Eli” <email@example.com> wrote: -----
preprocessing). For the ones that do need to be part of the output,
we need special cases to handle them in
Thank you Eli, I will have a look to fix this bug.