- May 29, 2013
-
-
Roman Divacky authored
users can disable those. Just like in autoconf generated makefiles. llvm-svn: 182881
-
Jordan Rose authored
In C, 'void' is treated like any other incomplete type, and though it is never completed, you can cast the address of a void-typed variable to do something useful. (In C++ it's illegal to declare a variable with void type.) Previously we asserted on this code; now we just treat it like any other incomplete type. And speaking of incomplete types, we don't know their extent. Actually check that in TypedValueRegion::getExtent, though that's not being used by any checkers that are on by default. llvm-svn: 182880
-
Rafael Espindola authored
llvm-svn: 182874
-
Argyrios Kyrtzidis authored
[libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented. llvm-svn: 182871
-
Reid Kleckner authored
While we can't yet emit vbtables, this allows us to find virtual bases of objects constructed in other TUs. This make iostream hello world work, since basic_ostream virtually inherits from basic_ios. Differential Revision: http://llvm-reviews.chandlerc.com/D795 llvm-svn: 182870
-
Reid Kleckner authored
Peter pointed out that C::f() is not a key function. C's key function is actually C::~C(). llvm-svn: 182866
-
Reid Kleckner authored
MSVC's class data is always comdat, so clang's should always be linkonce_odr in LLVM IR. Reviewers: pcc Differential Revision: http://llvm-reviews.chandlerc.com/D838 llvm-svn: 182865
-
Edwin Vane authored
newFrontendActionFactory() took a pointer to a callback to call when a source file was done being processed by an action. This revision updates the callback to include an ante-processing callback as well. Callback-providing class renamed and callback functions themselves renamed. Functions are no longer pure-virtual so users aren't forced to implement both callbacks if one isn't needed. llvm-svn: 182864
-
Manuel Klimek authored
Now that the TokenAnnotator does not require stack space anymore, reconstructing the lines has become the limiting factor. This patch fixes that problem, allowing large files with multiple megabytes of single unwrapped lines to be formatted. llvm-svn: 182861
-
Manuel Klimek authored
Gets rid of AnnotatedToken, putting everything into FormatToken. FormatTokens are created once, and only referenced by pointer. This enables multiple future features, like having tokens shared between multiple UnwrappedLines (while there's still work to do to fully enable that). llvm-svn: 182859
-
Daniel Jasper authored
llvm-svn: 182856
-
Daniel Jasper authored
If an identifier is on its own line and it is all upper case, it is highly likely that this is a macro that is meant to stand on a line by itself. Before: class A : public QObject { Q_OBJECT A() {} }; Ater: class A : public QObject { Q_OBJECT A() {} }; llvm-svn: 182855
-
Daniel Jasper authored
With option enabled (e.g. in Google-style): template <typename T> void f() {} With option disabled: template <typename T> void f() {} Enabling this for Google-style and Chromium-style, not sure which other styles would prefer that. llvm-svn: 182849
-
Rafael Espindola authored
This brings the number of linkage computations in "clang -cc1" in SemaExpr.ii from 58426 to 43134. With -emit-llvm the number goes from 161045 to 145461. llvm-svn: 182823
-
Jakob Stoklund Olesen authored
llvm-svn: 182821
-
Rafael Espindola authored
It was fixed back in r182750, but this is a nice testcase to have. llvm-svn: 182818
-
David Majnemer authored
C++ and C differ with respect to the handling of extern void declarations. Enforce the C++ behavior in C++ mode. llvm-svn: 182814
-
Fariborz Jahanian authored
in an @selector expression has no implementation. // rdar://14002507 llvm-svn: 182812
-
Ted Kremenek authored
llvm-svn: 182811
-
Anna Zaks authored
This gives slightly better precision, specifically, in cases where a non-typed region represents the array or when the type is a non-array type, which can happen when an array is a result of a reinterpret_cast. llvm-svn: 182810
-
Anna Zaks authored
It’s important for us to reason about the cast as it is used in std::addressof. The reason we did not handle the cast previously was a crash on a test case (see commit r157478). The crash was in processing array to pointer decay when the region type was not an array. Address the issue, by just returning an unknown in that case. llvm-svn: 182808
-
- May 28, 2013
-
-
Rafael Espindola authored
Before this patch the linkage cache was only used by the entry level function (getLinkage). The function that does the actual computation (getLVForDecl), never looked at it. This means that we would not reuse an entry in the cache when getLVForDecl did a recursive call. This patch fixes that by adding another computation enum value for when we don't care about the linkage at all and having getLVForDecl check the cache in that case. When running "clang -cc1" over SemaExpr.ii this brings the number of linkage computations from 93749 to 58426. When running "clang -cc1 -emit-llvm -O3" it goes from 198708 to 161444. For SemaExpr.ii at least linkage computation is a small enough percentage of the work that the time difference was in the noise. When asserts are enabled this patch also causes clang to check the linkage cache even on recursive calls. llvm-svn: 182799
-
Peter Collingbourne authored
Differential Revision: http://llvm-reviews.chandlerc.com/D745 llvm-svn: 182798
-
Daniel Jasper authored
llvm-svn: 182796
-
Daniel Jasper authored
This made it necessary to remove an error detection which would let us bail out of braced lists in certain situations of missing "}". However, as we always entirely escape from the braced list on finding ";", this should not be a big problem. With this, we can no format braced lists with uniformat inits: return { arg1, SomeType { parameter } }; llvm-svn: 182788
-
Fariborz Jahanian authored
does not support large load/store of atomic objects. // rdar://13973577 llvm-svn: 182781
-
Anna Zaks authored
In addition to enabling more code reuse, this suppresses some false positives by allowing us to compare an element region to its base. See the ptr-arith.cpp test cases for an example. llvm-svn: 182780
-
Daniel Jasper authored
Before: f( (*PointerToArray)[10]); After: f((*PointerToArray)[10]); This fixes llvm.org/PR16163 llvm-svn: 182777
-
Rafael Espindola authored
llvm-svn: 182773
-
Manuel Klimek authored
The FormatToken is now not copyable any more. llvm-svn: 182772
-
NAKAMURA Takumi authored
llvm-svn: 182769
-
Manuel Klimek authored
With this patch, we create all tokens in one go before parsing and pass an ArrayRef<FormatToken*> to the UnwrappedLineParser. The UnwrappedLineParser is switched to use pointer-to-token internally. The UnwrappedLineParser still copies the tokens into the UnwrappedLines. This will be fixed in an upcoming patch. llvm-svn: 182768
-
Daniel Jasper authored
llvm-svn: 182767
-
Manuel Klimek authored
To fully support this, we also need to expand tabs in the text before the block comment. This patch breaks indentation when there was a non-standard mixture of spaces and tabs used for indentation, but fixes a regression in the simple case: { /* * Comment. */ int i; } Is now formatted correctly, if there were tabs used for indentation before. llvm-svn: 182760
-
Manuel Klimek authored
Block comment indentation of empty lines regressed, as we did not have a test for it. /* Comment with... * * empty line. */ is now formatted correctly again. llvm-svn: 182757
-
Daniel Jasper authored
Before: int (*func)(void*); void f() { int(*func)(void*); } After (consistent space after "int"): int (*func)(void*); void f() { int (*func)(void*); } llvm-svn: 182756
-
Daniel Jasper authored
This gets turned into two ">" operators at the beginning in order to simplify template parameter handling. Thus, we need a special case to handle those two binary operators correctly. With this patch, clang-format can now correctly handle cases like: aaaaaa = aaaaaaa(aaaaaaa, // break aaaaaa) >> bbbbbb; llvm-svn: 182754
-
Jakob Stoklund Olesen authored
The coercion type serves two purposes: 1. Pad structs to a multiple of 64 bits, so they are passed 'left-aligned' in registers. 2. Expose aligned floating point elements as first-level elements, so the code generator knows to pass them in floating point registers. We also compute the InReg flag which indicates that the struct contains aligned 32-bit floats. This flag is used by the code generator to pick the right registers. llvm-svn: 182753
-
Rafael Espindola authored
Fixes PR16114. llvm-svn: 182750
-
Rafael Espindola authored
No intended functionality change. llvm-svn: 182749
-