mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 04:43:14 +01:00
Fix deprecation messages for non-vendor pragmas.
The deprecation message for non-vendor pragmas was never shown. Conflicts: gen/pragma.cpp
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "import.h"
|
||||
|
||||
#if IN_LLVM
|
||||
// From pragma.cpp
|
||||
bool matchPragma(Identifier* needle, Identifier* ident, Identifier* oldIdent);
|
||||
#if defined(_MSC_VER)
|
||||
#include <windows.h>
|
||||
#else
|
||||
@@ -3129,13 +3131,8 @@ Statement *PragmaStatement::semantic(Scope *sc)
|
||||
}
|
||||
#if IN_LLVM
|
||||
// FIXME Move to pragma.cpp
|
||||
else if (ident == Id::LDC_allow_inline || ident == Id::allow_inline)
|
||||
else if (matchPragma(ident, Id::LDC_allow_inline, 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
|
||||
|
||||
Reference in New Issue
Block a user