mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 14:36:18 +03:00
Add missing pragma and deprecation warning.
The LDC_allow_inline pragma is not recognized. The deprecation message for non-vendor pragmas is missing.
This commit is contained in:
parent
21563fa067
commit
fba9e204d8
1 changed files with 7 additions and 2 deletions
|
@ -3128,9 +3128,14 @@ Statement *PragmaStatement::semantic(Scope *sc)
|
|||
#endif
|
||||
}
|
||||
#if IN_LLVM
|
||||
// LDC
|
||||
else if (ident == Id::allow_inline)
|
||||
// FIXME Move to pragma.cpp
|
||||
else if (ident == Id::LDC_allow_inline || ident == Id::allow_inline)
|
||||
{
|
||||
#if DMDV2
|
||||
if (ident == Id::allow_inline && !global.params.useDeprecated)
|
||||
error("non-vendor-prefixed pragma '%s' is deprecated; use '%s' instead",
|
||||
Id::allow_inline->toChars(), Id::LDC_allow_inline->toChars());
|
||||
#endif
|
||||
sc->func->allowInlining = true;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue