| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.
The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.
Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.
llvm-svn: 97518
|
|
|
|
| |
llvm-svn: 96567
|
|
|
|
|
|
|
| |
may be some other places that could take advantage of this new information,
but I haven't really looked yet.
llvm-svn: 95600
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class
type to rvalue expressions of the unqualified variant of that
type. For example, given:
const int i;
(void)(i + 17);
the lvalue-to-rvalue conversion for the subexpression "i" will turn it
from an lvalue expression (a DeclRefExpr) with type 'const int' into
an rvalue expression with type 'int'. Both C and C++ mandate this
conversion, and somehow we've slid through without implementing it.
We now have both DefaultFunctionArrayConversion and
DefaultFunctionArrayLvalueConversion, and which gets used depends on
whether we do the lvalue-to-rvalue conversion or not. Generally, we do
the lvalue-to-rvalue conversion, but there are a few notable
exceptions:
- the left-hand side of a '.' operator
- the left-hand side of an assignment
- a C++ throw expression
- a subscript expression that's subscripting a vector
Making this change exposed two issues with blocks:
- we were deducing const-qualified return types of non-class type
from a block return, which doesn't fit well
- we weren't always setting the known return type of a block when it
was provided with the ^return-type syntax
Fixes the current Clang-on-Clang compile failure and PR6076.
llvm-svn: 95167
|
|
|
|
| |
llvm-svn: 94485
|
|
|
|
| |
llvm-svn: 94076
|
|
|
|
|
|
| |
declarations we're adding do not need any name-hiding checks.
llvm-svn: 93431
|
|
|
|
|
|
| |
eliminating yet one more ResultBuilder::MaybeAddResult caller.
llvm-svn: 93430
|
|
|
|
|
|
| |
ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult.
llvm-svn: 93429
|
|
|
|
|
|
|
|
| |
after adding the ability to determine whether our lookup is a
base-class lookup. Eliminate CollectMemberLookupResults, since it is
no longer used (yay).
llvm-svn: 93428
|
|
|
|
|
|
| |
LookupVisibleDecls. Also, a function does not hide another function.
llvm-svn: 93421
|
|
|
|
|
|
| |
of the more general LookupVisibleDecls.
llvm-svn: 93419
|
|
|
|
|
|
|
| |
than traversing visible declarations twice, only perform one traversal
and recognize nested-name-specifiers as special.
llvm-svn: 93418
|
|
|
|
|
|
|
| |
provided nested-name-specifier results for base classes (only), rather
than everything that could possibly be a nested-name-specifier.
llvm-svn: 93398
|
|
|
|
|
|
|
|
|
|
| |
LookupVisibleDecls, unifying the name lookup mechanisms used by code
completion and typo correction. Aside from the software-engineering
improvements, this makes code-completion see through using directives
and see ivars when performing unqualified name lookup in an
Objective-C instance method.
llvm-svn: 93397
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 93386
|
|
|
|
|
|
| |
code-completion's ResultBuilder::MaybeAddResult for later reuse.
llvm-svn: 93379
|
|
|
|
|
|
| |
are no longer using it for anything. No intended functionality change.
llvm-svn: 93376
|
|
|
|
|
|
|
|
| |
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)
llvm-svn: 93370
|
|
|
|
| |
llvm-svn: 93361
|
|
|
|
|
|
|
|
|
|
|
| |
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.
Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).
llvm-svn: 93354
|
|
|
|
|
|
| |
embedding single space characters. <rdar://problem/7485503>
llvm-svn: 93231
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for
static_cast<type>(expr)
when we can have an expression, or
using namespace identifier;
when we can have a using directive.
Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.
llvm-svn: 93134
|
|
|
|
| |
llvm-svn: 92310
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tring str2;
we produce the following diagnostic + fix-it:
typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'?
tring str2;
^~~~~
string
To make this really useful, we'll need to introduce typo correction in
many more places (wherever we do name lookup), and implement
declaration-vs-expression heuristics that cope with typos
better. However, for now this will handle the simple cases where we
already get good "unknown type name" diagnostics.
The LookupVisibleDecls functions are intended to be used by code
completion as well as typo correction; that refactoring will happen
later.
llvm-svn: 92308
|
|
|
|
| |
llvm-svn: 92162
|
|
|
|
| |
llvm-svn: 91951
|
|
|
|
| |
llvm-svn: 91702
|
|
|
|
|
|
|
|
|
| |
function in a C++ call using an arbitrary call-expression type.
Actually exploit this to fix the recovery implemented earlier.
The diagnostic is still iffy, though.
llvm-svn: 91538
|
|
|
|
|
|
|
|
|
| |
Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91422
|
|
|
|
|
|
| |
no extra safety anyway.
llvm-svn: 91207
|
|
|
|
|
|
| |
name lookup instead.
llvm-svn: 91141
|
|
|
|
|
|
| |
informative chunk.
llvm-svn: 91139
|
|
|
|
| |
llvm-svn: 91138
|
|
|
|
| |
llvm-svn: 91137
|
|
|
|
|
|
|
|
|
| |
specializations and class template partial specializations (they're
never named directly). Also, member access expressions only refer to
value declarations (fields, functions, enumerators, etc.) and
Objective-C property declarations; filter out everything else.
llvm-svn: 91133
|
|
|
|
|
|
| |
completion results
llvm-svn: 91125
|
|
|
|
| |
llvm-svn: 90758
|
|
|
|
| |
llvm-svn: 90757
|
|
|
|
| |
llvm-svn: 90756
|
|
|
|
|
|
| |
thinko in a PointerUnion::get call.
llvm-svn: 90719
|
|
|
|
|
|
|
| |
llvm::DenseMap, for a 20% performance improvement in the
Cocoa-big-list performance benchmark.
llvm-svn: 90715
|
|
|
|
| |
llvm-svn: 90663
|
|
|
|
| |
llvm-svn: 90662
|
|
|
|
|
|
| |
ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting.
llvm-svn: 90661
|
|
|
|
|
|
| |
for a massive speedup
llvm-svn: 90209
|
|
|
|
|
|
| |
those associated with TemplateNames.
llvm-svn: 90162
|
|
|
|
| |
llvm-svn: 90088
|
|
|
|
|
|
|
|
|
|
|
|
| |
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.
This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.
Also resolves a few FIXMEs.
llvm-svn: 89785
|
|
|
|
|
|
|
|
|
|
| |
locations" into
a new class. Use it pervasively throughout Sema.
My fingers hurt.
llvm-svn: 89638
|