| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
scope, when no other indication is provided that the user intended to declare a
function rather than a variable.
Remove some false positives from the existing 'parentheses disambiguated as a
function' warning by suppressing it when the declaration is marked as 'typedef'
or 'extern'.
Add a new warning group -Wvexing-parse containing both of these warnings.
The new warning is enabled by default; despite a number of false positives (and
one bug) in clang's test-suite, I have only found genuine bugs with it when
running it over a significant quantity of real C++ code.
llvm-svn: 147599
|
| |
|
|
|
|
| |
pieces to build the lambda class and its call operator. Create an actual scope for the lambda body.
llvm-svn: 147595
|
| |
|
|
|
|
| |
rdar://10630328
llvm-svn: 147591
|
| |
|
|
| |
llvm-svn: 147589
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to see hidden declarations because every tag lookup is effectively a
redeclaration lookup. For example, image that
struct foo;
is declared in a submodule that is known but hasn't been imported. If
someone later writes
struct foo *foo_p;
then "struct foo" is either a reference or a redeclaration. To keep
the redeclaration chains sound, we treat it like a redeclaration for
name-lookup purposes.
llvm-svn: 147588
|
| |
|
|
| |
llvm-svn: 147582
|
| |
|
|
|
|
|
|
| |
SourceManager::getFileEntryForSLocEntry()
to make sure we do not crash. rdar://10594186
llvm-svn: 147576
|
| |
|
|
| |
llvm-svn: 147575
|
| |
|
|
|
|
| |
from a module file, don't bother parsing a new definition
llvm-svn: 147574
|
| |
|
|
|
|
|
|
| |
c++ object reference type with trivial copy constructor.
This causes an assert crash and bad code gen. when assert
is off. // rdar://6137845
llvm-svn: 147573
|
| |
|
|
|
|
|
| |
umbrella directory, skip includes for any headers that are part of an
unavailable module.
llvm-svn: 147572
|
| |
|
|
| |
llvm-svn: 147570
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a result of a call.
Problem:
Global variables, which come in from system libraries should not be
invalidated by all calls. Also, non-system globals should not be
invalidated by system calls.
Solution:
The following solution to invalidation of globals seems flexible enough
for taint (does not invalidate stdin) and should not lead to too
many false positives. We split globals into 3 classes:
* immutable - values are preserved by calls (unless the specific
global is passed in as a parameter):
A : Most system globals and const scalars
* invalidated by functions defined in system headers:
B: errno
* invalidated by all other functions (note, these functions may in
turn contain system calls):
B: errno
C: all other globals (which are not in A nor B)
llvm-svn: 147569
|
| |
|
|
| |
llvm-svn: 147568
|
| |
|
|
|
|
| |
'objc_disable_automatic_synthesis'.
llvm-svn: 147567
|
| |
|
|
| |
llvm-svn: 147566
|
| |
|
|
| |
llvm-svn: 147565
|
| |
|
|
|
|
|
|
| |
in the module map. This provides a bit more predictability for the
user, as well as eliminating the need to sort the submodules when
serializing them.
llvm-svn: 147564
|
| |
|
|
| |
llvm-svn: 147563
|
| |
|
|
|
|
|
| |
properties in classes declared with objc_suppress_autosynthesis
attribute, pinpoint location of the said class in a note.
llvm-svn: 147562
|
| |
|
|
|
|
|
|
|
|
| |
address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer.
With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary.
Fixes PR11705.
llvm-svn: 147561
|
| |
|
|
| |
llvm-svn: 147558
|
| |
|
|
|
|
| |
information even in subscripting operations.
llvm-svn: 147557
|
| |
|
|
| |
llvm-svn: 147556
|
| |
|
|
|
|
| |
which is automatic with proper spelling :).
llvm-svn: 147555
|
| |
|
|
| |
llvm-svn: 147552
|
| |
|
|
|
|
|
|
|
| |
any language variant), and restrict __has_feature(objc_modules) to
mean that we also have the Objective-C @import syntax. I anticipate
__has_feature(cxx_modules) and/or __has_feature(c_modules) for when we
nail down the module syntax for C/C++.
llvm-svn: 147548
|
| |
|
|
| |
llvm-svn: 147545
|
| |
|
|
| |
llvm-svn: 147535
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
different modules. This implementation is a first approximation of
what we want, using only the function type to determine
equivalence. Later, we'll want to deal with some of the more subtle
issues, including:
- C allows a prototyped declaration and a non-prototyped declaration
to be merged, which we should support
- We may want to ignore the return type when merging, then
complain if the return types differ. Or, we may want to leave it
as it us, so that we only complain if overload resolution
eventually fails.
- C++ non-static member functions need to consider cv-qualifiers
and ref-qualifiers.
- Function templates need to consider the template parameters and
return type.
- Function template specializations will have special rules.
- We can now (accidentally!) end up overloading in C, even without
the "overloadable" attribute, and will need to detect this at some
point.
The actual detection of "is this an overload?" is implemented by
Sema::IsOverload(), which will need to be moved into the AST library
for re-use here. That will be a future refactor.
llvm-svn: 147534
|
| |
|
|
|
|
|
|
|
|
|
| |
modules, so long as the typedefs refer to the same underlying
type. This ensures that the typedefs end up in the same redeclaration
chain.
To test this, fix name lookup for C/Objective-C to properly deal with
multiple declarations with the same name in the same scope.
llvm-svn: 147533
|
| |
|
|
|
|
|
| |
While the code took care of disabling the sse42 flag it didn't know
about popcnt. This broke -march=native on penryn.
llvm-svn: 147531
|
| |
|
|
|
|
| |
thing.
llvm-svn: 147530
|
| |
|
|
| |
llvm-svn: 147526
|
| |
|
|
|
|
| |
or when modules are disabled.
llvm-svn: 147524
|
| |
|
|
|
|
| |
PR11690.
llvm-svn: 147523
|
| |
|
|
|
|
| |
BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier.
llvm-svn: 147522
|
| |
|
|
|
|
| |
is either N32 or N64.
llvm-svn: 147520
|
| |
|
|
| |
llvm-svn: 147517
|
| |
|
|
|
|
| |
use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet.
llvm-svn: 147515
|
| |
|
|
| |
llvm-svn: 147511
|
| |
|
|
| |
llvm-svn: 147506
|
| |
|
|
| |
llvm-svn: 147505
|
| |
|
|
|
|
|
|
| |
variety is treated as a 'void *'. No need to issue
warning reserved for objc object properties.
// rdar://10565506
llvm-svn: 147504
|
| |
|
|
|
|
| |
independent of whether we're in C++11 mode.
llvm-svn: 147503
|
| |
|
|
|
|
| |
and realloc(). Patch by Cyril Roelandt!
llvm-svn: 147500
|
| |
|
|
|
|
| |
consider whether this is a redeclaration lookup when determining whether to look for the visible declaration
llvm-svn: 147499
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the AST reader doesn't actually perform a merge, because name lookup
knows how to merge identical typedefs together.
As part of this, teach C/Objective-C name lookup to return multiple
results in all cases, rather than first digging through the attributes
to see if the value is overloadable. This way, we'll catch ambiguous
lookups in C/Objective-C.
llvm-svn: 147498
|
| |
|
|
|
|
| |
Anton Lokhmotov.
llvm-svn: 147496
|
| |
|
|
|
|
|
|
| |
called transitively
from C++ constructors or destructors. Checker by Lei Zhang with a few tweaks by Ted Kremenek.
llvm-svn: 147494
|