| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This code doesn't care where the data it is processing comes from, so a
StringRef is probably the most natural interface.
llvm-svn: 215448
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(const
typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);
After:
int aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
const typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);
llvm-svn: 215442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the gcc docs, -include uses the current working directory
for the lookup instead of the main source file.
This patch gets rid of NormalizeIncludePath (which relied on an
implementation detail of FileManager / FileEntry for the include path
logic to work), and instead hands the correct lookup information down to
LookupFile.
This will allow us to change the FileEntry's behavior regarding its Name
caching.
llvm-svn: 215433
|
|
|
|
|
|
|
|
| |
DW_TAG_unspecified_parameter.
Fixes rdar://13690847
llvm-svn: 215423
|
|
|
|
|
|
| |
location so their diagnostics have somewhere to point.
llvm-svn: 215416
|
|
|
|
|
|
|
|
|
|
|
| |
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.
This warning can be syntactically disabled by using ", ..." instead of "...".
llvm-svn: 215408
|
|
|
|
|
|
|
|
| |
anyway. If -ast-dump *is* also provided, then dump the AST declarations as well
as the lookup results. This is invaluable for cross-correlating the lookup
information with the declarations actually found.
llvm-svn: 215393
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(dropping const from the reference as MemoryBuffer is immutable already,
so const is just redundant - and while I'd personally put const
everywhere, that's not the LLVM Way (see llvm::Type for another example
of an immutable type where "const" is omitted for brevity))
Changing the pointer argument to a reference parameter makes call sites
identical between callers with unique_ptrs or raw pointers, minimizing
the churn in a pending unique_ptr migrations.
llvm-svn: 215391
|
|
|
|
|
|
|
|
|
|
| |
And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the beginning or the end of the list, there was no problem) and add a
unit test to exercise the code path (which successfully crashed when run
(with modifications to match the old API) without this patch applied)
llvm-svn: 215388
|
|
|
|
| |
llvm-svn: 215376
|
|
|
|
| |
llvm-svn: 215375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang used a custom implementation of lookup when handling designated
initializers. The custom code was not particularly optimized and relied
on standard lookup for typo-correction anyway.
This custom code has to go, it doesn't properly support MSVC-style
anonymous structs embedded inside other records; replace it with the
typo-correction path.
This has the side effect of speeding up semantic handling of the fields
for a designated initializer while simplifying the code at the same
time.
This fixes PR20573.
Differential Revision: http://reviews.llvm.org/D4839
llvm-svn: 215372
|
|
|
|
|
|
| |
use microsoft's ABI
llvm-svn: 215371
|
|
|
|
|
|
| |
In a Clang bootstrap, the size of this vector was always 11.
llvm-svn: 215370
|
|
|
|
|
|
|
|
| |
Generic_GCC::GCCInstallationDetector::init
In a bootstrap build of Clang, the size was always greater than 12.
llvm-svn: 215369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in Clang. Reject other values.
Summary:
Just like with -finput-charset=UTF-8 in review http://reviews.llvm.org/D4347, I think we should just ignore it when UTF-8 is provided.
Reviewers: rnk, rafael
Reviewed By: rafael
Subscribers: rafael, cfe-commits
Differential Revision: http://reviews.llvm.org/D4841
llvm-svn: 215368
|
|
|
|
| |
llvm-svn: 215365
|
|
|
|
|
|
|
|
| |
In a Clang bootstrap, this vector always held 129 elements.
Also switch to a range-based for loop.
llvm-svn: 215360
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In cases like:
struct C { ~C(); }
void f(C c = C());
void t() {
f();
}
We currently do not add the CXXBindTemporaryExpr for the temporary (the
code mentions that as the default parameter expressions are owned by
the declaration, we'd otherwise add the same expression multiple times),
but we add the temporary destructor pointing to the CXXBindTemporaryExpr.
We need to fix that before we can re-enable the assertion.
llvm-svn: 215357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
http://llvm.org/bugs/show_bug.cgi?id=20587
Added K&R style. It could be enabled by the following option:
```
BreakBeforeBraces: KernighanRitchie
```
This style is like `Attach`, but break *only* before function
declarations.
As I can see, no additional logic required to support this style, any
style different from other styles automagically satisfies K&R.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D4837
llvm-svn: 215354
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had two bugs:
- We wouldn't properly warn when a struct/union/enum was mentioned
inside of a record definition if no declarator was provided. We
should have mentioned that this declaration declares nothing.
- We didn't properly support Microsoft's extension where certain
declspecs without declarators would act as anonymous structs/unions.
* We completely ignored the case where such a declspec could be a
union.
* We didn't properly handle the case where a record was defined inside
another record:
struct X {
int a;
struct Y {
int b;
};
};
llvm-svn: 215347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unique_ptr around a non-owning raw_ostream in CodeGenAction::CreateASTConsumer"
It cannot be compiled on Visual Studio 2012.
clang\include\clang/Frontend/CompilerInstance.h(153):
error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'
with
[
_Ty=llvm::raw_ostream
]
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1447) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
with
[
_Ty=llvm::raw_ostream
]
This diagnostic occurred in the compiler generated function 'clang::CompilerInstance::OutputFile::OutputFile(const clang::CompilerInstance::OutputFile &)'
llvm-svn: 215346
|
|
|
|
|
|
| |
a non-owning raw_ostream in CodeGenAction::CreateASTConsumer
llvm-svn: 215331
|
|
|
|
|
|
| |
that's causing GCC on some buildbots some confusion.
llvm-svn: 215327
|
|
|
|
|
|
|
|
|
| |
CompilerInstance.h on Sema.h
Hopefully this fixes the libstdc++ build on some of the buildbots after
r215321.
llvm-svn: 215325
|
|
|
|
|
|
|
|
| |
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.
llvm-svn: 215323
|
|
|
|
| |
llvm-svn: 215321
|
|
|
|
| |
llvm-svn: 215320
|
|
|
|
| |
llvm-svn: 215319
|
|
|
|
| |
llvm-svn: 215318
|
|
|
|
| |
llvm-svn: 215317
|
|
|
|
|
|
|
|
| |
thunks are needed
Reviewed at http://reviews.llvm.org/D4822
llvm-svn: 215312
|
|
|
|
|
|
|
|
|
| |
one, perform the import if the types match even if the imported declaration is
hidden. Otherwise, NamedDecl::declarationReplaces will drop one of the name
lookup entries, making the typedef effectively inaccessible from one of the
modules that declared it.
llvm-svn: 215306
|
|
|
|
|
|
| |
ScopedLineState
llvm-svn: 215294
|
|
|
|
|
|
| |
From Matt Thomas.
llvm-svn: 215292
|
|
|
|
| |
llvm-svn: 215291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang :: Frontend/iframework.c
Clang :: Frontend/system-header-prefix.c
Clang :: Index/annotate-comments-objc.m
Clang :: Index/annotate-module.m
Clang :: Index/index-module.m
Clang :: Index/index-pch-with-module.m
Clang :: PCH/case-insensitive-include.c
Suprisingly the normalize_separators() was no-op when LLVM_ON_WIN32.
Its replacement native() does change path separators into \ as expected,
breaking these tests.
I had fixed the tests by #ifndef LLVM_ON_WIN32 on the native call,
to match the previous behaviour.
If this logic is not used on Windows host, it might be completely
deleted as there should not be windows path seperators on Linux hosts.
I can't test on Linux but if someone can run tests on Linux after
commenting out the line
llvm::sys::path::native(NormalizedPath);
and the tests pass, the whole if (LangOpts.MSVCCompat) could be deleted.
llvm-svn: 215290
|
|
|
|
|
|
|
|
| |
return adjusting thunks
Reviewed at http://reviews.llvm.org/D4829
llvm-svn: 215285
|
|
|
|
|
|
|
|
|
| |
class Module. It's almost always going to be the same as
getContainingModule() for top-level modules, so just add a map to cover
the remaining cases. This lets us do less bookkeeping to keep the
ModuleMap fields up to date.
llvm-svn: 215268
|
|
|
|
|
|
| |
Patch by Jim Grosbach.
llvm-svn: 215260
|
|
|
|
|
|
|
|
|
| |
These macros are used as markers for Interface Builder and need to be defined
to empty strings since they have no impact on the code.
Patch by Ted Kremenek.
llvm-svn: 215259
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D4799
llvm-svn: 215258
|
|
|
|
|
|
|
|
|
|
|
|
| |
indirection.
Summary: I was going to fix the use of raw pointer ownership in "takeGraph" when I realized that function was unused and the whole ExplodedGraph could just be owned by value without the std::unique_ptr indirection at all.
Reviewers: jordan_rose
Differential Revision: http://reviews.llvm.org/D4833
llvm-svn: 215257
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This flag can be used to force linking of CXX-specific parts
of sanitizer runtimes into the final executable. It gives more precise
control than --driver-mode=g++ and comes handy when user links several
object files with sanitized C++ code into an executable, but wants
to provide libstdc++ himself, instead of relying on Clang dirver's
behavior.
Test Plan: clang regression test suite
Reviewers: chandlerc, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4824
llvm-svn: 215252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macro arguments.
Previously, these warnings skipped any code in a macro expansion. Preform an
additional check and warn when the expression and context locations are both
in the macro argument.
The most obvious case not caught is passing a pointer directly to a macro,
i.e 'assert(&array)' but 'assert(&array && "valid array")' is caught. This is
because macro arguments are not typed and the conversion happens inside the
macro.
llvm-svn: 215251
|
|
|
|
|
|
|
| |
use mis-cased property name (which is currently accepted silently
due to the way property setters are named). rdar://17911746
llvm-svn: 215250
|
|
|
|
| |
llvm-svn: 215246
|
|
|
|
|
|
|
|
| |
The previous encoding only allowed a single digit for the minor version
number. This changes it to use 2 digits for both the minor version and the
revision number.
llvm-svn: 215245
|
|
|
|
|
|
|
| |
llvm::sys::path::native has a superset of the functionality and this was the
only use of llvm::sys::fs::normalize_separators.
llvm-svn: 215242
|
|
|
|
|
|
|
|
| |
It wasn't actually a bug that -mabicalls/-mno-abicalls wasn't being passed to
GAS. The only reason we pass it to the integrated assembler is because it shares
the same framework with CodeGen.
llvm-svn: 215236
|