| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
a source location came from the predefines buffer.
llvm-svn: 174190
|
|
|
|
|
|
|
|
|
| |
This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.
<rdar://problem/13107323&13121362>
llvm-svn: 174081
|
|
|
|
|
|
|
| |
Compilation always sets this explicitly, but creating a preprocessor
manually should still put the 'IsPreprocessedOutput' flag in a valid state.
llvm-svn: 174077
|
|
|
|
| |
llvm-svn: 174075
|
|
|
|
|
|
|
|
| |
#define X X
for which there is no point warning, ever.
llvm-svn: 173991
|
|
|
|
|
|
| |
This reverts commit r173952
llvm-svn: 173970
|
|
|
|
|
|
|
|
| |
This caused hangs as we processed the same invalid byte over and over.
<rdar://problem/13115651>
llvm-svn: 173959
|
|
|
|
|
|
|
|
|
| |
for "#define X X".
This is a pattern that, for example, stdbool.h uses.
rdar://12435773
llvm-svn: 173952
|
|
|
|
|
|
| |
This is required to use them in TableGen.
llvm-svn: 173924
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
People use the C preprocessor for things other than C files. Some of them
have Unicode characters. We shouldn't warn about Unicode characters
appearing outside of identifiers in this case.
There's not currently a way for the preprocessor to tell if it's in -E mode,
so I added a new flag, derived from the PreprocessorOutputOptions. This is
only used by the Unicode warnings for now, but could conceivably be used by
other warnings or even behavioral differences later.
<rdar://problem/13107323>
llvm-svn: 173881
|
|
|
|
|
|
|
|
|
|
|
|
| |
if they were already concatenated in source using the spelling locations
even if they came from a macro expansion.
This fixes an issue where a GUID passed as macro argument ends up
malformed after preprocessing because we added spaces inside it.
rdar://13016645
llvm-svn: 173826
|
|
|
|
|
|
| |
Fixes a crash. Thanks, Richard.
llvm-svn: 173701
|
|
|
|
|
|
|
| |
Unfortunately, we can't accept the UCN as an extension because we're
required to treat it as two tokens for preprocessing purposes.
llvm-svn: 173622
|
|
|
|
| |
llvm-svn: 173578
|
|
|
|
|
|
|
|
| |
factor the realpath calls into FileManager::getCanonicalName() so we
can cache the results of this epically slow operation. 5% speedup on
my modules test, and realpath drops out of the profile.
llvm-svn: 173542
|
|
|
|
| |
llvm-svn: 173447
|
|
|
|
| |
llvm-svn: 173409
|
|
|
|
|
|
| |
Thanks, Dmitri.
llvm-svn: 173400
|
|
|
|
| |
llvm-svn: 173371
|
|
|
|
| |
llvm-svn: 173370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a missing piece for C99 conformance.
This patch handles UCNs by adding a '\\' case to LexTokenInternal and
LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
If the UCN is not syntactically well-formed, we fall back to the old
treatment: a backslash followed by an identifier beginning with 'u' (or 'U').
Because the spelling of an identifier with UCNs still has the UCN in it, we
need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.
Of course, valid code that does *not* use UCNs will see only a very minimal
performance hit (checks after each identifier for non-ASCII characters,
checks when converting raw_identifiers to identifiers that they do not
contain UCNs, and checks when getting the spelling of an identifier that it
does not contain a UCN).
This patch also adds basic support for actual UTF-8 in the source. This is
treated almost exactly the same as UCNs except that we consider stray
Unicode characters to be mistakes and offer a fixit to remove them.
llvm-svn: 173369
|
|
|
|
| |
llvm-svn: 173368
|
|
|
|
|
|
|
|
|
|
|
|
| |
bogus with a PCH
that redefined a macro without undef'ing it first.
Proper reconstruction of the macro info history from modules will properly fix this in subsequent commits.
rdar://13016031
llvm-svn: 173281
|
|
|
|
|
|
| |
from Saleem Abdulrasool!
llvm-svn: 173208
|
|
|
|
| |
llvm-svn: 172884
|
|
|
|
| |
llvm-svn: 172861
|
|
|
|
|
|
|
|
|
| |
Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once.
Unfortunately I couldn't get a reduced test case.
rdar://13016031
llvm-svn: 172843
|
|
|
|
| |
llvm-svn: 172808
|
|
|
|
|
|
|
| |
complicated modules (<rdar://problem/13038265>). Unfortunately, this
un-fixes <rdar://problem/13016031>.
llvm-svn: 172783
|
|
|
|
|
|
| |
not supported.
llvm-svn: 172732
|
|
|
|
|
|
|
| |
echristo already fixed this in r172649, but I'll leave the reformatting in
since I'm in the blame history for it now anyway.
llvm-svn: 172672
|
|
|
|
|
|
| |
Rewrapping courtesy of clang-format.
llvm-svn: 172668
|
|
|
|
|
|
| |
initializations to fix Wreorder warning.
llvm-svn: 172649
|
|
|
|
|
|
| |
is used outside of a preprocessor directive. This fixes PR14837.
llvm-svn: 172639
|
|
|
|
|
|
|
|
| |
defined.
Patch by Enea Zaffanella!
llvm-svn: 172623
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would serialize the macro redefinitions as a list, part of
the identifier, and try to chain them together across modules individually
without having the info that they were already chained at definition time.
Change this by serializing the macro redefinition chain and then try
to synthesize the chain parts across modules. This allows us to correctly
pinpoint when 2 different definitions are ambiguous because they came from
unrelated modules.
Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH
is redefined without undef'ing it first.
rdar://13016031
llvm-svn: 172620
|
|
|
|
| |
llvm-svn: 172555
|
|
|
|
|
|
|
|
| |
will have a shared library with the same name as its framework (and no
suffix!) within its .framework directory. Detect this both when
inferring the whole top-level framework and when parsing a module map.
llvm-svn: 172439
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
metadata for linking against the libraries/frameworks for imported
modules.
The module map language is extended with a new "link" directive that
specifies what library or framework to link against when a module is
imported, e.g.,
link "clangAST"
or
link framework "MyFramework"
Importing the corresponding module (or any of its submodules) will
eventually link against the named library/framework.
For now, I've added some placeholder global metadata that encodes the
imported libraries/frameworks, so that we can test that this
information gets through to the IR. The format of the data is still
under discussion.
llvm-svn: 172437
|
|
|
|
|
|
| |
callers, removing unneeded const_cast
llvm-svn: 172372
|
|
|
|
|
|
| |
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
|
|
|
|
|
|
| |
uniformly with symlinks between top-level and embedded frameworks.
llvm-svn: 172030
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases when
there are macro expansions inside macro arguments where the arguments are
not expanded in the same order as listed; don't assert that all macro expansions
are in source order.
rdar://12397063
llvm-svn: 172018
|
|
|
|
|
|
| |
<rdar://problem/12748859>.
llvm-svn: 171939
|
|
|
|
|
|
|
|
| |
Lexer::getRawToken().
No functionality change.
llvm-svn: 171771
|
|
|
|
| |
llvm-svn: 171516
|
|
|
|
|
|
|
|
| |
keyword for ObjC properties.
Fixes <rdar://problem/12953378>.
llvm-svn: 171504
|
|
|
|
| |
llvm-svn: 171497
|
|
|
|
| |
llvm-svn: 171367
|
|
|
|
|
|
| |
reached EOF and did not expand the argument into the source context.
llvm-svn: 170980
|