| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For non-dynamic classes (no virtual bases), member data pointers are
simple offsets from the base of the record. Dynamic classes use an
aggregate for member data pointers and are therefore currently
unsupported.
Unlike Itanium, the ms ABI uses 0 to represent null for polymorphic
classes. Non-polymorphic classes use -1 like Itanium, since 0 is a
valid field offset.
Reviewers: rjmccall
CC: timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D558
llvm-svn: 177753
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
interaction to eliminate a pile of extraneous stats().
The refactoring in r177367 introduced a serious performance bug where
the "lazy" resolution of module file names in the global module index
to actual module file entries in the module manager would perform
repeated negative stats(). The new interaction requires the module
manager to inform the global module index when a module file has been
loaded, eliminating the extraneous stat()s and a bunch of bookkeeping
on both sides.
llvm-svn: 177750
|
| |
|
|
|
|
|
|
| |
for self.GetterName where GetterName is the getter method
for a property with name different from the property name
(declared via a property getter attribute) // rdar://12791315
llvm-svn: 177744
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It turns out that
-foo;
can be an objective C method declaration. So instead of the previous
solution, recognize objective C methods only if we are in a declaration
scope.
llvm-svn: 177740
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int a; // not formatted
// formatting this line only
After:
int a; // not formatted
// formatting this line only
This makes clang-format stable independent of whether the whole
file or single lines are formatted in most cases.
llvm-svn: 177739
|
| |
|
|
|
|
| |
As the comment says, it's a little silly to cache it in the ABI code.
llvm-svn: 177738
|
| |
|
|
|
|
|
|
|
| |
Otherwise, +/- and the beginning of constants can be recognized
incorrectly.
Before: #define A - 1
After: #define A -1
llvm-svn: 177725
|
| |
|
|
| |
llvm-svn: 177721
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently one needs to set LangOptions.LineComment.
Before "//* */" got reformatted to "/ /* */" as the lexer was returning
the token sequence (slash, comment). This could also lead to weird other
stuff, e.g. for people that like to using comments like:
//****************
llvm-svn: 177720
|
| |
|
|
| |
llvm-svn: 177705
|
| |
|
|
|
|
|
|
| |
hierarchy-related at a possibly nonzero offset.
Patch by Alexander Zinenko!
llvm-svn: 177698
|
| |
|
|
|
|
|
|
|
|
|
|
| |
picking up cleanups from earlier in the statement. Also fix a
crash-on-invalid where a reference to an invalid decl from an
enclosing scope was causing an expression to fail to build, but
only *after* a cleanup was registered from that statement,
causing an assertion downstream.
The crash-on-valid is rdar://13459289.
llvm-svn: 177692
|
| |
|
|
|
|
| |
value argument. If not, be sure we don't accidentally use a dynamic alloca.
llvm-svn: 177690
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers defining size_t/ptrdiff_t/wchar_t.
Clang's <stddef.h> provides definitions for the C standard library
types size_t, ptrdiff_t, and wchar_t. However, the system's C standard
library headers tend to provide the same typedefs, and the two
generally avoid each other using the macros
_SIZE_T/_PTRDIFF_T/_WCHAR_T. With modules, however, we need to see
*all* of the places where these types are defined, so provide the
typedefs (ignoring the macros) when modules are enabled.
llvm-svn: 177686
|
| |
|
|
|
|
|
|
|
|
| |
structure, so it's easier to find.
We now put the Clang module cache in
<system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day
there will be other caches under <system-temp-directory>/org.llvm.clang>.
llvm-svn: 177671
|
| |
|
|
| |
llvm-svn: 177665
|
| |
|
|
|
|
|
|
|
|
| |
is issused for on overriding 'readwrite'
property which is not auto-synthesized.
Buttom line is that if hueristics determine
that there will be a user implemented setter,
no warning will be issued. // rdar://13388503
llvm-svn: 177662
|
| |
|
|
| |
llvm-svn: 177657
|
| |
|
|
|
|
| |
covered switch.
llvm-svn: 177656
|
| |
|
|
|
|
| |
Debug utility only, no functionality change.
llvm-svn: 177649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
1. When splitting one-line block comment, use indentation and *s.
2. Remove trailing whitespace from all lines of a comment, not only the ones being splitted.
3. Add backslashes for all lines if a comment is used insed a preprocessor directive.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D557
llvm-svn: 177635
|
| |
|
|
|
|
| |
targeting the iOS simulator.
llvm-svn: 177633
|
| |
|
|
|
|
| |
of their subdirectory in the include path.
llvm-svn: 177621
|
| |
|
|
|
|
|
|
|
| |
enum return type to be converted to blocks with any integer type
of the same size.
rdar://13463504
llvm-svn: 177613
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
sanitizer runtime is present.
* libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
a C++ ABI library, and is always linked in.
* libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
C++ ABI library, and is only linked in when linking a C++ binary.
This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).
The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).
The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.
llvm-svn: 177605
|
| |
|
|
|
|
|
|
|
|
| |
Reviewers: rjmccall
CC: timurrrr, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D554
llvm-svn: 177589
|
| |
|
|
| |
llvm-svn: 177583
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Clarify what MacroInfo::isBuiltinMacro means, as it really means something
more like "isMagicalMacro" or "requiresProcessingBeforeExpansion" -- the
macros defined in "<built-in>" are not considered built-in by this function;
* Escape __LINE__ as \__LINE__ in Doxygen comments so that the underscores
don't get replaced by *bold* output;
* Turn comments in MacroInfo.cpp into non-Doxygen comments, so that they
don't result in duplicated/badly formatted Doxygen output;
* Clean up a bunch of \brief formatting, and add a \file comment for
MacroInfo.h.
llvm-svn: 177581
|
| |
|
|
|
|
| |
and warn when a newly-imported module conflicts with an already-imported module.
llvm-svn: 177577
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes some mistaken condition logic in RegionStore that caused
global variables to be invalidated when /any/ region was invalidated,
rather than only as part of opaque function calls. This was only
being used by CStringChecker, and so users will now see that strcpy()
and friends do not invalidate global variables.
Also, add a test case we don't handle properly: explicitly-assigned
global variables aren't being invalidated by opaque calls. This is
being tracked by <rdar://problem/13464044>.
llvm-svn: 177572
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to improper modelling of copy constructors (specifically, their
const reference arguments), we were producing spurious leak warnings
for allocated memory stored in structs. In order to silence this, we
decided to consider storing into a struct to be the same as escaping.
However, the previous commit has fixed this issue and we can now properly
distinguish leaked memory that happens to be in a struct from a buffer
that escapes within a struct wrapper.
Originally applied in r161511, reverted in r174468.
<rdar://problem/12945937>
llvm-svn: 177571
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this case, the value of 'x' may be changed after the call to indirectAccess:
struct Wrapper {
int *ptr;
};
void indirectAccess(const Wrapper &w);
void test() {
int x = 42;
Wrapper w = { x };
clang_analyzer_eval(x == 42); // TRUE
indirectAccess(w);
clang_analyzer_eval(x == 42); // UNKNOWN
}
This is important for modelling return-by-value objects in C++, to show
that the contents of the struct are escaping in the return copy-constructor.
<rdar://problem/13239826>
llvm-svn: 177570
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a bit of old code trying to deal with the fact that functions that
take pointers often use them to access an entire array via pointer
arithmetic. However, RegionStore already conservatively assumes you can use
pointer arithmetic to access any part of a region.
Some day we may want to go back to handling this specifically for calls,
but we can do that in the future.
No functionality change.
llvm-svn: 177569
|
| |
|
|
|
|
|
|
| |
I am not sure how much we can improve for
when a randon ObjC keyword is thrown into the
ivar decl. block. // rdar://6854840
llvm-svn: 177553
|
| |
|
|
|
|
|
| |
'}' is missing for the ivar declarations.
// rdar://6854840
llvm-svn: 177549
|
| |
|
|
|
|
| |
Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko.
llvm-svn: 177546
|
| |
|
|
|
|
| |
don't depend on any other modules or PCH files.
llvm-svn: 177542
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.
We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.
Updated from r177211.
rdar://12818789
llvm-svn: 177541
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Added support for pointers-to-members usage via .* and a few tests.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D556
llvm-svn: 177537
|
| |
|
|
|
|
|
| |
clang-format can't do anything useful, so it should leave the remainder
of the line unchanged, but it should not assert/segfault.
llvm-svn: 177530
|
| |
|
|
|
|
| |
Discovered when accidentally formatting a python file :-).
llvm-svn: 177527
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before (when only reformatting "int b"):
int a; // comment
// comment
int b;
After:
int a; // comment
// comment
int b;
This also fixes llvm.org/PR15433.
llvm-svn: 177524
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
aaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 177521
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to be generally more desired.
Before:
if (aaaaaaaa &&
bbbbbbbb >
cccccccc) {}
After:
if (aaaaaaaa &&
bbbbbbbb >
cccccccc) {}
Also: Some formatting cleanup on clang-format's files.
llvm-svn: 177514
|
| |
|
|
|
|
|
|
|
|
| |
Otherwise, this can become hard to read.
Before: #define A \
case 1:
After: #define A \
case 1:
llvm-svn: 177509
|
| |
|
|
|
|
| |
Before: A<int * (int)>;
After: A<int *(int)>;
llvm-svn: 177505
|
| |
|
|
|
|
|
|
|
|
| |
We were checking "Arch == llvm::Triple::x86_64 || Arch
== llvm::Triple::x86_64", but the rhs should actually check for
powerpc64.
Found while experimenting with a potential new Clang warning.
llvm-svn: 177496
|
| |
|
|
|
|
| |
Patch by Stephen Lin!
llvm-svn: 177490
|
| |
|
|
|
|
|
|
|
| |
deserialized correctly.
This fixes regressions introduced in r177466 that caused several
module tests to fail sporadically.
llvm-svn: 177481
|
| |
|
|
|
|
| |
initializers.
llvm-svn: 177480
|