Clang error: macro name missing (err_pp_missing_macro_name)
Jump to navigation
Jump to search
Text | error: macro name missing |
---|---|
Type | Error |
Category | Lexical or Preprocessor Issue |
Internal Id | err_pp_missing_macro_name |
Internal Message | macro name missing
|
Regular Expression | (?:error|fatal error)\: macro name missing
|
First Commit | 2009-03-04 b1c4d5507fad The basic representation of diagnostics information in tablegen format, plus (uncommented and incomp... |
Description
Example
Flags | -xc
|
|
---|---|---|
Source |
#define
// Missing macro name
| |
Compiler Output |
<source>:1:8: error: macro name missing |
Clang Internals (17.0.6)
Git Commit Message
The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format. llvm-svn: 66064
Used in Clang Sources
This section lists all occurrences of the diagnostic within the Clang's codebase. For each occurrence, an auto-extracted snipped from the source code is listed including key elements like control structures, functions, or classes. It should illustrate the conditions under which the diagnostic is activated.
clang/lib/Lex/PPDirectives.cpp (line 324)
bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, bool *ShadowFlag) {
// Missing macro name?
if (MacroNameTok.is(tok::eod))
return Diag(MacroNameTok, diag::err_pp_missing_macro_name);
Triggered in Clang Tests
This section lists all internal Clang test cases that trigger the diagnostic.
clang/test/Preprocessor/ifdef-recover.c
- clang/test/Preprocessor/ifdef-recover.c:5:7: error: macro name missing
- clang/test/Preprocessor/ifdef-recover.c:13:12: error: macro name missing
- clang/test/Preprocessor/ifdef-recover.c:25:9: error: macro name missing