- Aug 24, 2017
-
-
Alex Lorenz authored
This should fix http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_build/41578/ llvm-svn: 311656
-
Alex Lorenz authored
This commit adds the base AST source selection component to the refactoring library. AST selection is represented using a tree of SelectedASTNode values. Each selected node gets its own selection kind, which can actually be None even in the middle of tree (e.g. statement in a macro whose child is in a macro argument). The initial version constructs a "raw" selection tree, without applying filters and canonicalisation operations to the nodes. Differential Revision: https://reviews.llvm.org/D35012 llvm-svn: 311655
-
Coby Tayree authored
This patch is intended to enable the use of basic double letter constraints used in GCC extended inline asm {Yi Y2 Yz Y0 Ym Yt}. Supersedes D35205 llvm counterpart: D36369 Differential Revision: https://reviews.llvm.org/D36371 llvm-svn: 311643
-
Krasimir Georgiev authored
This reverts commit r311457. It reveals some dormant bugs in comment reflowing, like breaking a single line jsdoc type annotation before a parameter into multiple lines. llvm-svn: 311641
-
Leo Li authored
Summary: We need to register effective triple before calling `getARMFloatABI`. Add missing code when `--print-libgcc-file-name` is passed. Reviewers: atanasyan, rsmith, mgorny, peter.smith, kristof.beyls, compnerd, jroelofs Reviewed By: compnerd Subscribers: llvm-commits, aemerson, javed.absar, srhines, kristof.beyls, pirama Differential Revision: https://reviews.llvm.org/D35742 llvm-svn: 311624
-
Saleem Abdulrasool authored
`id` needs to be handled specially since it is a `TypedefType` which is sugar for an `ObjCObjectPointerType` whose pointee is an `ObjCObjectType` with base `BuiltinType::ObjCIdType` and no protocols and the first level of pointer gets it own type implementation. `Class` is similar with the `ObjCClassType` as the base instead. The qualifiers on the base type of the `ObjCObjectType` need to be dropped because the innermost `mangleType` will handle the qualifiers itself. `id` is desugared to `struct objc_object *` which should be encoded as `PAUobjc_object@@`. `Class` is desugared to `struct objc_class *` which should be encoded as `PAUobjc_class@@`. We were previously applying an extra modifier `A` which will be handled during the recursive call. This now properly decorates interface types as well as `Class` and `id`. This corrects the interactions between C++ and ObjC++ for the type specifier decoration. llvm-svn: 311617
-
Richard Smith authored
Fix mangling for dependent "type { expr-list }" expressions, and add mangling for designated initializers matching recent cxx-abi-dev discussion. llvm-svn: 311612
-
- Aug 23, 2017
-
-
Adrian Prantl authored
parented in function declarations. Fixes PR33997. https://bugs.llvm.org/show_bug.cgi?id=33997 llvm-svn: 311601
-
Richard Smith authored
[ubsan] PR34266: When sanitizing the 'this' value for a member function that happens to be a lambda call operator, use the lambda's 'this' pointer, not the captured enclosing 'this' pointer (if any). llvm-svn: 311589
-
Saleem Abdulrasool authored
GCC will interpret `__attribute__((__aligned__))` as 8-byte alignment on ARM, but clang will not. Explicitly specify the alignment. This mirrors the declaration in libunwind. llvm-svn: 311576
-
Johannes Altmanninger authored
Summary: This moves the data collection macro calls for Stmt nodes to lib/AST/StmtDataCollectors.inc Users can subclass ConstStmtVisitor and include StmtDataCollectors.inc to define visitor methods for each Stmt subclass. This makes it also possible to customize the visit methods as exemplified in lib/Analysis/CloneDetection.cpp. Move helper methods for data collection to a new module, AST/DataCollection. Add data collection for DeclRefExpr, MemberExpr and some literals. Reviewers: arphaman, teemperor! Subscribers: mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36664 llvm-svn: 311569
-
Krasimir Georgiev authored
This reverts commit r311559, which added a test containing raw string literals in macros, which chokes gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55971 llvm-svn: 311566
-
Saleem Abdulrasool authored
The C++ ABI requires that the exception object (which under AEABI is the `_Unwind_Control_Block`) is double-word aligned. The attribute was applied to the `_Unwind_Exception` type, but not the `_Unwind_Control_Block`. This should fix the libunwind test for the alignment of the exception type. llvm-svn: 311563
-
Nico Weber authored
This makes -Wunreachable-code work for programs containing SEH (except for __finally, which is still missing for now). __try is modeled like try (but simpler since it can only have a single __except or __finally), __except is fairly similar to catch (but simpler, since it can't contain declarations). __leave is implemented similarly to break / continue. Use the existing addTryDispatchBlock infrastructure (which FindUnreachableCode() in ReachableCode.cpp uses via cfg->try_blocks_begin()) to mark things in the __except blocks as reachable. Re-use TryTerminatedBlock. This means we add EH edges from calls to the __try block, but not from all other statements. While this is incomplete, it matches LLVM's SEH codegen support. Also, in practice, BuildOpts.AddEHEdges is always false in practice from what I can tell, so we never even insert the call EH edges either. https://reviews.llvm.org/D36914 llvm-svn: 311561
-
Krasimir Georgiev authored
Summary: This patch makes the splits emitted for the beginning of comment lines during reformatting absolute. Previously, they were relative to the start of the non-whitespace content of the line, which messes up further TailOffset calculations in breakProtrudingToken. This fixes an assertion failure reported in bug 34236: https://bugs.llvm.org/show_bug.cgi?id=34236. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36956 llvm-svn: 311559
-
Rui Ueyama authored
This reverts commit r311552 because it broke ubsan and asan bots. llvm-svn: 311557
-
Yuka Takahashi authored
Summary: This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker takes, which is defined in clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically. First, from ValuesCode class in Options.td, TableGen will generate C++ code in Options.inc. Options.inc will be included in DriverOptions.cpp, and calls OptTable's addValues function. addValues function will add second argument to Option's Values class. Values contains string like "foo,bar,.." which is handed to Values class in OptTable. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: hiraditya, cfe-commits Differential Revision: https://reviews.llvm.org/D36782 llvm-svn: 311552
-
Johannes Altmanninger authored
llvm-svn: 311544
-
Krasimir Georgiev authored
Summary: ColumnLimit = 0 means no limit, so comment should always be aligned if requested. This was broken with https://llvm.org/svn/llvm-project/cfe/trunk@304687 introduced via https://reviews.llvm.org/D33830 and is included in 5.0.0-rc2. This commit fixes it and adds a unittest for this property. Should go into clang-5.0 IMHO. Contributed by @pboettch! Reviewers: djasper, krasimir Reviewed By: djasper, krasimir Subscribers: hans, klimek Differential Revision: https://reviews.llvm.org/D36967 llvm-svn: 311532
-
Yonghong Song authored
-mcpu=# will support: . generic: the default insn set . v1: insn set version 1, the same as generic . v2: insn set version 2, version 1 + additional jmp insns . probe: the compiler will probe the underlying kernel to decide proper version of insn set. Examples: $ clang -target bpf -mcpu=v1 -c t.c $ clang -target bpf -mcpu=v2 -c t.c $ clang -target bpf -mcpu=generic -c t.c $ clang -target bpf -mcpu=probe -c t.c $ clang -target bpf -mcpu=v3 -c t.c error: unknown target CPU 'v3' Signed-off-by:
Yonghong Song <yhs@fb.com> Acked-by:
Alexei Starovoitov <ast@kernel.org> llvm-svn: 311523
-
Richard Trieu authored
llvm-svn: 311519
-
- Aug 22, 2017
-
-
Dan Albert authored
With tests fixed for Windows style paths now that they are going through path canonicalization. llvm-svn: 311487
-
Volodymyr Sapsai authored
This is the same assertion as in https://reviews.llvm.org/D25206 that is triggered when RecordLayoutBuilder tries to compute the size of a field (for capture "typo_boo" in the test case) whose type hasn't been deduced. The fix is to add CorrectDelayedTyposInExpr call to the cases when we aren't disambiguating between an Obj-C message send and a lambda expression. rdar://problem/31760839 Reviewers: rsmith, ahatanak Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36853 llvm-svn: 311480
-
Alexey Bataev authored
of class fails to map class static variable. If the global variable is captured and it has several redeclarations, sometimes it may lead to a compiler crash. Patch fixes this by working only with canonical declarations. llvm-svn: 311479
-
Krasimir Georgiev authored
Summary: This patch is an alternative to https://reviews.llvm.org/D36614, by resolving a non-idempotency issue by breaking non-trailing comments: Consider formatting the following code with column limit at `V`: ``` V const /* comment comment */ A = B; ``` The comment is not a trailing comment, breaking before it doesn't bring it under the column limit. The formatter breaks after it, resulting in: ``` V const /* comment comment */ A = B; ``` For a next reformat, the formatter considers the comment as a trailing comment, so it is free to break it further, resulting in: ``` V const /* comment comment */ A = B; ``` This patch improves the situation by directly producing the third case. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D37007 llvm-svn: 311457
-
Petar Jovanovic authored
Rename the function getSupportedNanEncoding() to getIEEE754Standard(), since this function will be used for non-nan related features. Patch by Aleksandar Beserminji. Differential Revision: https://reviews.llvm.org/D36824 llvm-svn: 311454
-
Erik Verbruggen authored
Failing Tests (2): Clang :: CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp Clang :: SemaCXX/alias-template.cpp llvm-svn: 311445
-
Alex Lorenz authored
This commit fixes a bug introduced in r307903. The attribute ambiguity checker that was introduced in r307903 checked all property attributes, which caused errors for source-compatible properties, like: @property (nonatomic, readonly) NSObject *prop; @property (nonatomic, readwrite) NSObject *prop; because the readwrite property would get implicit 'strong' attribute. The ambiguity checker should be concerned about explicitly specified attributes only. rdar://33748089 llvm-svn: 311443
-
Erik Verbruggen authored
When we have enabled cache for global completions we did not have diagnostics for Bar and could not complete Ba as in provided code example. template <typename T> struct Foo { T member; }; template<typename T> using Bar = Foo<T>; int main() { Ba } Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D35355 llvm-svn: 311442
-
Johannes Altmanninger authored
Handle the case when DeclContext is null. llvm-svn: 311434
-
Johannes Altmanninger authored
Summary: If a node referring to a name is within a class or namespace, do not use the full qualified name, but strip the namespace prefix. Reviewers: arphaman, bkramer Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36681 llvm-svn: 311433
-
George Karpenkov authored
llvm-svn: 311422
-
George Karpenkov authored
Differential Revision: https://reviews.llvm.org/D36909 llvm-svn: 311406
-
Akira Hatanaka authored
supplied. With this change, -fno-exceptions disables unwind tables unless -funwind-tables is supplied too or the target is x86-64 (x86-64 requires emitting unwind tables). rdar://problem/33934446 llvm-svn: 311397
-
Stephan T. Lavavej authored
This is a reasonably non-intrusive change, which I've verified works for both x86 and x64 DevDiv-internal builds. The idea is to change `bool IsVS2017OrNewer` into a 3-state `ToolsetLayout VSLayout`. Either a build is DevDiv-internal, released VS 2017 or newer, or released VS 2015 or older. When looking at the directory structure, if instead of `"VC"` we see `"x86ret"`, `"x86chk"`, `"amd64ret"`, or `"amd64chk"`, we recognize this as a DevDiv-internal build. After we get past the directory structure validation, we use this knowledge to regenerate paths appropriately. `llvmArchToDevDivInternalArch()` knows how we use `"i386"` subdirectories, and `MSVCToolChain::getSubDirectoryPath()` uses that. It also knows that DevDiv-internal builds have an `"inc"` subdirectory instead of `"include"`. This may still not be the "right" fix in any sense, but I believe that it's non-intrusive in the sense that if the special directory names aren't found, no codepaths are affected. (`ToolsetLayout::OlderVS` and `ToolsetLayout::VS2017OrNewer` correspond to `IsVS2017OrNewer` being `false` or `true`, respectively.) I searched for all references to `IsVS2017OrNewer`, which are places where Clang cares about VS's directory structure, and the only one that isn't being patched is some logic to deal with cross-compilation. I'm fine with that not working for DevDiv-internal builds for the moment (we typically test the native compilers), so I added a comment. Fixes D36860. llvm-svn: 311391
-
- Aug 21, 2017
-
-
Kamil Rytarowski authored
Summary: Enable SanitizerKind::Fuzzer and SanitizerKind::FuzzerNoLink on x86_64. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, george.karpenkov Reviewed By: vitalybuka Subscribers: cfe-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36935 llvm-svn: 311365
-
Peter Szecsi authored
The LoopExit CFG information provides the opportunity to not mark the loops but having a stack which tracks if a loop is unrolled or not. So in case of simulating a loop we just add it and the information if it meets the requirements to be unrolled to the top of the stack. Differential Revision: https://reviews.llvm.org/D35684 llvm-svn: 311346
-
Peter Szecsi authored
This patch adds handling of the LoopExit CFGElements to the StaticAnalyzer. This is reached by introducing a new ProgramPoint. Tests will be added in a following commit. Differential Revision: https://reviews.llvm.org/D35670 llvm-svn: 311344
-
Simon Atanasyan authored
llvm-svn: 311334
-
Ilya Biryukov authored
Summary: The crash occurs when the first token after a preamble is a macro expansion. Fixed by moving replayPreambleConditionalStack from Parser into Preprocessor. It is now called right after the predefines file is processed. Reviewers: erikjv, bkramer, klimek, yvvan Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36872 llvm-svn: 311330
-