- Oct 19, 2015
-
-
Nico Weber authored
-assume-filename, -fallback-style, and -sort-includes are new. (They're also longer than the previous options, so all descriptions shift over by some amount, making this diff look larger than it is.) It looks like someone renamed "General options" to "Generic Options" too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250672 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Update list of languages advertised in OVERVIEW: A tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code. If no arguments are specified, it formats the code from standard input and writes the result to the standard output. If <file>s are given, it reformats the files. If -i is specified together with <file>s, the files are edited in-place. Otherwise, the result is written to the standard output. USAGE: clang-format [options] [<file> ...] OPTIONS: -assume-filename=<string> - When reading from stdin, clang-format assumes this filename to look for a style config file (with -style=file) and to determine the language. -cursor=<uint> - The position of the cursor when invoking clang-format from an editor integration -dump-config - Dump configuration options to stdout and exit. Can be used with -style option. -fallback-style=<string> - The name of the predefined style used as a fallback in case clang-format is invoked with -style=file, but can not find the .clang-format file to use. Use -fallback-style=none to skip formatting. -help - Display available options (-help-hidden for more) -i - Inplace edit <file>s, if specified. -length=<uint> - Format a range of this length (in bytes). Multiple ranges can be formatted by specifying several -offset and -length pairs. When only a single -offset is specified without -length, clang-format will format up to the end of the file. Can only be used with one input file. -lines=<string> - <start line>:<end line> - format a range of lines (both 1-based). Multiple ranges can be formatted by specifying several -lines arguments. Can't be used with -offset and -length. Can only be used with one input file. -offset=<uint> - Format a range starting at this byte offset. Multiple ranges can be formatted by specifying several -offset and -length pairs. Can only be used with one input file. -output-replacements-xml - Output replacements as XML. -sort-includes - Sort touched include lines -style=<string> - Coding style, currently supports: LLVM, Google, Chromium, Mozilla, WebKit. Use -style=file to load style configuration from .clang-format file located in one of the parent directories of the source file (or current directory for stdin). Use -style="{key: value, ...}" to set specific parameters, e.g.: -style="{BasedOnStyle: llvm, IndentWidth: 8}" -version - Display the version of this program output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250671 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 18, 2015
-
-
Nick Lewycky authored
emacs mode marker. (Changes left behind from another patch that ended up not working out.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250666 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Do direct assignment of boolean values and regroup. Use StringSwitch instead of custom cases. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250665 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dimitry Andric authored
Summary: Similar to rL248426 (which was a followup to rL248379 and rL248424), add the required libraries for OpenMP on the linker command line, and update the test case. Reviewers: emaste, theraven, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250657 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
If a RegExp contains a character group with a quote (/["]/), the trailing end of it is first tokenized as a string literal, which leads to the merging code seeing an unbalanced bracket. This change parses regex literals from the left hand side. That simplifies the parsing code and also allows correctly handling escapes and character classes, hopefully correctly parsing all regex literals. Patch by Martin Probst, thank you. Review: http://reviews.llvm.org/D13765 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250648 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250647 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
Add an unnecessary makeArrayRef I add earlier. I didn't realize range-based for loops worked with arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250646 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250645 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
clang/test/Driver/ps4-linker-non-win.c: Tweak for cygwin like ps4-linker-win.c@250403. Cygwin seeks dependent libs along $PATH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250632 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250631 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250630 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250629 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 17, 2015
-
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250621 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250617 91177308-0d34-0410-b5e6-96231b3b80d8
-
Davide Italiano authored
Reported by: Kim Grasman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250602 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
During the initial template parse for this code, 'member' is unresolved and we don't know anything about it: struct A { int member }; template <typename T> struct B : public T { using T::member; static void f() { (void)member; // Could be static or non-static. } }; template class B<A>; The pattern declaration contains an UnresolvedLookupExpr rather than an UnresolvedMemberExpr because `f` is static, and `member` should never be a field. However, if the code is invalid, it may become a field, in which case we should diagnose it. Reviewers: rjmccall, rsmith Differential Revision: http://reviews.llvm.org/D6700 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250592 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
via -fmodule-file= to be turned off; in that case, just include the relevant files textually. This allows module files to be unconditionally passed to all compile actions via CXXFLAGS, and to be ignored for rules that specify custom incompatible flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250577 91177308-0d34-0410-b5e6-96231b3b80d8
-
Davide Italiano authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250559 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 16, 2015
-
-
Richard Smith authored
Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250554 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Barton authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250547 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Barton authored
If you increase the number of diags of a particular type by one more than the number available you get the nice assert message. If you do it by two more than available you get the old non-helpful message. Combining the two makes sense I think. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250546 91177308-0d34-0410-b5e6-96231b3b80d8
-
James Y Knight authored
Also move the addLibStdCXXIncludePaths helper function from Linux to Generic_GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250536 91177308-0d34-0410-b5e6-96231b3b80d8
-
Filipe Cabecinhas authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250516 91177308-0d34-0410-b5e6-96231b3b80d8
-
Filipe Cabecinhas authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250515 91177308-0d34-0410-b5e6-96231b3b80d8
-
Filipe Cabecinhas authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250514 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250503 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sean Eveson authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250500 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250498 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250496 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250495 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Burgess IV authored
r246877 made __builtin_object_size substantially more aggressive with unknown bases if Type=1 or Type=3, which causes issues when we encounter code like this: struct Foo { int a; char str[1]; }; const char str[] = "Hello, World!"; struct Foo *f = (struct Foo *)malloc(sizeof(*f) + strlen(str)); strcpy(&f->str, str); __builtin_object_size(&f->str, 1) would hand back 1, which is technically correct given the type of Foo, but the type of Foo lies to us about how many bytes are available in this case. This patch adds support for this "writing off the end" idiom -- we now answer conservatively when we're given the address of the very last member in a struct. Differential Revision: http://reviews.llvm.org/D12169 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250488 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Burgess IV authored
Previously, our logic when taking the address of an overloaded function would not consider enable_if attributes, so long as all of the enable_if conditions on a given candidate were true. So, two functions with identical signatures (one with enable_if attributes, the other without), would be considered equally good overloads. If we were calling the function instead of taking its address, then the function with enable_if attributes would be preferred. This patch makes us prefer the candidate with enable_if regardless of if we're calling or taking the address of an overloaded function. Differential Revision: http://reviews.llvm.org/D13795 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250486 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
Summary: The title says it all. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13790 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250477 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250475 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
match the feature set of the function that they're being called from. This ensures that we can effectively diagnose some[1] code that would instead ICE in the backend with a failure to select message. Example: __m128d foo(__m128d a, __m128d b) { return __builtin_ia32_addsubps(b, a); } compiled for normal x86_64 via: clang -target x86_64-linux-gnu -c would fail to compile in the back end because the normal subtarget features for x86_64 only include sse2 and the builtin requires sse3. [1] We're still not erroring on: __m128i bar(__m128i const *p) { return _mm_lddqu_si128(p); } where we should fail and error on an always_inline function being inlined into a function that doesn't support the subtarget features required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250473 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
Update the fma builtins to be fma/fma4 until some we can find some documentation either way. Update a couple of the avx intrinsics because they were in the wrong category. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250470 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 15, 2015
-
-
Teresa Johnson authored
This addresses a bot failure from r250455, since new Misc/thinlto.c test uses it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250460 91177308-0d34-0410-b5e6-96231b3b80d8
-
Teresa Johnson authored
This recommits r250398 with fixes to the tests for bot failures. Add "-target x86_64-unknown-linux" to the clang invocations that check for the gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250455 91177308-0d34-0410-b5e6-96231b3b80d8
-