| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
module-import dependencies, so we'll get the link order correct for
those silly linkers that need it.
llvm-svn: 172459
|
| |
|
|
|
|
| |
link options for the modules it imports.
llvm-svn: 172448
|
| |
|
|
|
|
| |
This should fix cast-away-const warnings reported by David Greene.
llvm-svn: 172446
|
| |
|
|
|
|
| |
Patch by David Greene, modified by me.
llvm-svn: 172445
|
| |
|
|
|
|
|
|
|
|
|
| |
This was previously added to support -[NSAutoreleasePool drain], which
behaves like -release under non-GC and "please collect" under GC. We're
not currently modeling the autorelease pool stack, though, so we can
just take this out entirely.
Fixes PR14927.
llvm-svn: 172444
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
!0 = metadata !{metadata !"-lautolink"}
!1 = metadata !{metadata !"-framework", metadata !"autolink_framework"}
referenced from llvm.module.linkoptions, e.g.,
!llvm.module.linkoptions = !{!0, !1, !2, !3}
This conceptually moves the logic for figuring out the syntax the
linker will accept from LLVM into Clang. Moreover, it makes it easier
to support MSVC's
#pragma comment(linker, "some option")
in the future, should anyone care to do so.
llvm-svn: 172441
|
| |
|
|
|
|
|
|
| |
will have a shared library with the same name as its framework (and no
suffix!) within its .framework directory. Detect this both when
inferring the whole top-level framework and when parsing a module map.
llvm-svn: 172439
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the 64-bit PowerPC ELF ABI.
The ABI requires that the real and imaginary parts of a complex argument
each occupy their own doubleword. Arguments smaller than 8 bytes are
right-adjusted within the doubleword.
Clang expects EmitVAARG() to return a pointer to a structure in which
the real and imaginary parts are packed adjacently in memory. To accomplish
this, we generate code to load the code appropriately from the varargs
location and pack the values into a temporary variable in the form Clang
expects, returning a pointer to that structure.
The test case demonstrates correct code generation for all "small" complex
types on PPC64: int, short, char, and float.
llvm-svn: 172438
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
metadata for linking against the libraries/frameworks for imported
modules.
The module map language is extended with a new "link" directive that
specifies what library or framework to link against when a module is
imported, e.g.,
link "clangAST"
or
link framework "MyFramework"
Importing the corresponding module (or any of its submodules) will
eventually link against the named library/framework.
For now, I've added some placeholder global metadata that encodes the
imported libraries/frameworks, so that we can test that this
information gets through to the IR. The format of the data is still
under discussion.
llvm-svn: 172437
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now format this correctly:
Status::Rep Status::global_reps[3] = {
{ kGlobalRef, OK_CODE, NULL, NULL, NULL },
{ kGlobalRef, CANCELLED_CODE, NULL, NULL, NULL },
{ kGlobalRef, UNKNOWN_CODE, NULL, NULL, NULL }
};
- fixed a bug where BreakBeforeClosingBrace would be set on the wrong
state
- added penalties for breaking between = and {, and between { and any
other non-{ token
llvm-svn: 172433
|
| |
|
|
|
|
|
|
|
| |
Now, "if (a) return;" is only allowed, if this option is set.
Also add a Chromium style which is currently identical to Google style
except for this option.
llvm-svn: 172431
|
| |
|
|
|
|
|
| |
If the first line of a merge would exactly fit into the column limit,
an unsigned overflow made us not break.
llvm-svn: 172426
|
| |
|
|
|
|
|
| |
Before: #include "a.h" #include "b.h"
After: #include "a.h"
#include "b.h"
llvm-svn: 172424
|
| |
|
|
|
|
|
| |
Before: #define A \
A
After: #define A A
llvm-svn: 172423
|
| |
|
|
|
|
| |
parsing diff output.
llvm-svn: 172420
|
| |
|
|
|
|
|
|
|
|
|
| |
Before: if (a)
return;
After: if (a) return;
Not yet sure, whether this is always desired, but we can add options and
make this a style parameter as we go along.
llvm-svn: 172413
|
| |
|
|
|
|
|
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D269
"Added dumping of declaration comments in ASTDumper. This required moving the
comment dumping code from CommentDumper so that the indentation is correct."
Patch by Philip Craig!
llvm-svn: 172409
|
| |
|
|
|
|
| |
x86_64-unknown-unknown, or it doesn't work for targetting win32.
llvm-svn: 172404
|
| |
|
|
|
|
|
|
|
|
|
| |
Main difference, add an AnnotatedLine class to hold information about a
line while formatting. At the same time degrade the UnwrappedLine class
to a class solely used for communicating between the UnwrappedLineParser
and the Formatter.
No functional changes intended.
llvm-svn: 172403
|
| |
|
|
|
|
|
|
| |
Before: (a->f()) ++;
a[42] ++;
After: (a->f())++;
a[42]++;
llvm-svn: 172400
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unit tests.
Summary:
Added tests for clang-format diagnostics. Added DiagnosticConsumer
argument to clang::format::reformat().
Reviewers: klimek, djasper
Reviewed By: djasper
CC: cfe-commits, thakis, rafael.espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D290
llvm-svn: 172399
|
| |
|
|
|
|
|
| |
While reviewing r172303 I noticed that I wasn't sure whether we still
format those correctly and didn't see any tests.
llvm-svn: 172396
|
| |
|
|
| |
llvm-svn: 172391
|
| |
|
|
|
|
|
| |
on redeclarations, since that makes us pick wrong prior declarations under
some circumstances.
llvm-svn: 172384
|
| |
|
|
|
|
|
|
|
|
|
| |
1) Supported by Clang, and
2) Supported by GCC, and
3) Documented in GCC's manual.
g++ allows its C++11-style attributes to appertain only to the entity being
declared, and never to a type (even for a type attribute), so we do the same.
llvm-svn: 172382
|
| |
|
|
|
|
|
|
| |
They work fine, but this fifth use of colons (after labels, in ?:,
in initalizer lists in constructors, in objc method expressions, and in
bitfields) wasn't covered by tests yet.
llvm-svn: 172377
|
| |
|
|
|
|
| |
we know whether it is static.
llvm-svn: 172376
|
| |
|
|
| |
llvm-svn: 172375
|
| |
|
|
| |
llvm-svn: 172373
|
| |
|
|
|
|
| |
callers, removing unneeded const_cast
llvm-svn: 172372
|
| |
|
|
| |
llvm-svn: 172370
|
| |
|
|
| |
llvm-svn: 172367
|
| |
|
|
| |
llvm-svn: 172362
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-format should not change whether or not there is a line break
before a line comment as this strongly influences the percieved binding.
User input: void f(int a,
// b is awesome
int b);
void g(int a, // a is awesome
int b);
Before: void f(int a, // b is awesome
int b);
void g(int a, // a is awesome
int b);
After: <unchanged from input>
llvm-svn: 172361
|
| |
|
|
| |
llvm-svn: 172357
|
| |
|
|
|
|
|
|
|
|
|
| |
Note that I don't know whether we should put {} on a single line in this
case, but it is probably a theoretical issue as in practice such
structs, classes or unions won't be empty.
Before: union A {}
a;
After: union A {} a;
llvm-svn: 172355
|
| |
|
|
|
|
|
|
|
|
| |
flag information down from the Clang driver into the Gold linker plugin
for LTO. This allows specifying -march on the linker commandline and
should hopefully have it pass all the way through to the LTO optimizer.
Fixes PR14697.
llvm-svn: 172354
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly;
llvm::Type *XTy = X->getType();
ArrayRef<llvm::Type *> Ty(XTy);
llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty);
Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten;
llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType()));
ArrayRef<T> has an implicit constructor to create uni-entry of T;
llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType());
MSVC-generated clang.exe crashed.
llvm-svn: 172352
|
| |
|
|
|
|
|
|
|
|
| |
I am not aware of a case where that would be wrong. The specific case I
am fixing are function parameters wrapped in parenthesis (e.g. in
macros).
Before: function(a,(b));
After: function(a, (b));
llvm-svn: 172351
|
| |
|
|
|
|
| |
Before: #include <a - a>
After: #include <a-a>
llvm-svn: 172350
|
| |
|
|
|
|
|
|
|
| |
A ")" before any of "=", "{" or ";" won't be a cast. This fixes issues
with the formatting of unnamed parameters.
Before: void f(int *){}
After: void f(int *) {}
llvm-svn: 172349
|
| |
|
|
| |
llvm-svn: 172345
|
| |
|
|
|
|
| |
on theree targets, i686, amd64, win64.
llvm-svn: 172344
|
| |
|
|
|
|
| |
builtins-multiprecision.c.
llvm-svn: 172343
|
| |
|
|
| |
llvm-svn: 172342
|
| |
|
|
|
|
|
| |
We lower all of these intrinsics into a 2x chained usage of
uadd.with.overflow.
llvm-svn: 172341
|
| |
|
|
| |
llvm-svn: 172340
|
| |
|
|
|
|
|
|
|
|
| |
Before:
[color getRed: &r green: &g blue: &b alpha: &a];
Now:
[color getRed:&r green:&g blue:&b alpha:&a];
llvm-svn: 172337
|
| |
|
|
|
|
| |
happens to work already.
llvm-svn: 172335
|
| |
|
|
| |
llvm-svn: 172334
|