[PATCH] D51281: [libclang] Return the proper pointee type for 'auto' deduced to pointer

2018-08-28 Thread Michael Wu via Phabricator via cfe-commits
michaelwu added a comment. It shouldn't be too hard to make a test using `c-index-test`. `-test-print-type` will print out the pointee type if it's valid. Comment at: tools/libclang/CXType.cpp:448 break; +case Type::Auto: + TP =

[PATCH] D51354: Fix the -print-multi-directory flag to print the selected multilib.

2018-08-28 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM. Thanks for fixing this! Repository: rC Clang https://reviews.llvm.org/D51354 ___ cfe-commits mailing list

[PATCH] D51358: [driver] Do not pass "-flavor old-gnu" option to LLD linker

2018-08-28 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D51358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r340889 - Start reserving x18 by default on Android targets.

2018-08-28 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Tue Aug 28 18:38:47 2018 New Revision: 340889 URL: http://llvm.org/viewvc/llvm-project?rev=340889=rev Log: Start reserving x18 by default on Android targets. Differential Revision: https://reviews.llvm.org/D45588 Modified: cfe/trunk/test/Driver/sanitizer-ld.c Modified:

[PATCH] D45588: Start reserving x18 by default on Android targets.

2018-08-28 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340889: Start reserving x18 by default on Android targets. (authored by pcc, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-08-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It says the type of the assignment expression, not the type of the LHS. C11 [6.5.16]p2: "The type of an assignment expression is the type the left operand would have after lvalue conversion." C11 [6.3.2.1]p2: "...this is called lvalue conversion. If the lvalue has

[PATCH] D51007: Test the cross-product of options that affect how libgcc-related arguments are passed to the linker.

2018-08-28 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Feel free to add any tests like this that test existing behavior without review in the future. If we want to change the behavior we should probably review that though :) -eric

[PATCH] D51395: [analyzer] Dump a reproducible, deterministic ID of program state to exploded graph

2018-08-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: dcoughlin, NoQ. Herald added subscribers: Szelethus, mikhail.ramalho, a.sidorin, mgrang, szepet, baloghadamsoftware, xazax.hun. https://reviews.llvm.org/D51395 Files:

[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator

2018-08-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. george.karpenkov added reviewers: NoQ, bogner, chandlerc, zturner, aprantl. Herald added a subscriber: mgrang. There are many "dumping" actions available from the compiler: Clang dumps AST, Clang static analyzer dumps generated nodes in the "exploded

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-08-28 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10668 + if (Source->isAtomicType() || Target->isAtomicType()) +S.Diag(E->getBeginLoc(), diag::warn_atomic_implicit_seq_cst); + rjmccall wrote: > jfb wrote: > > rjmccall wrote: > > > Why would

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-08-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10668 + if (Source->isAtomicType() || Target->isAtomicType()) +S.Diag(E->getBeginLoc(), diag::warn_atomic_implicit_seq_cst); + jfb wrote: > rjmccall wrote: > > Why would the target be an

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-08-28 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10668 + if (Source->isAtomicType() || Target->isAtomicType()) +S.Diag(E->getBeginLoc(), diag::warn_atomic_implicit_seq_cst); + rjmccall wrote: > Why would the target be an atomic type? And if

[PATCH] D51391: [clang-cl,PCH] Add support for #pragma hdrstop

2018-08-28 Thread Mike Rice via Phabricator via cfe-commits
mikerice created this revision. mikerice added reviewers: thakis, hans. With clang-cl, when the user specifies /Yc or /Yu without a header the compiler uses a #pragma hdrstop in the main source file to determine the end of the PCH. If a header is specified with /Yc or /Yu #pragma hdrstop has no

[PATCH] D51294: Fix Bug 38713: clang-format mishandles a short block after "default:" in a switch statement

2018-08-28 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 162989. owenpan marked an inline comment as done. owenpan added a comment. Added a comment suggested by @sammccall Repository: rC Clang https://reviews.llvm.org/D51294 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp

[PATCH] D33314: clang-format: Add option to remove semicolon at end of namespace

2018-08-28 Thread Anatol Pomozov via Phabricator via cfe-commits
anatol.pomozov added a comment. Would it be possible to add a Fixer that removes unneeded semicolon after C function? https://reviews.llvm.org/D33314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51294: Fix Bug 38713: clang-format mishandles a short block after "default:" in a switch statement

2018-08-28 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked an inline comment as done. owenpan added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:486 return 0; +if (Line.First->is(tok::kw_default)) { + const FormatToken *Tok = Line.First->getNextNonComment(); sammccall

[PATCH] D51390: [analyzer] CallDescription: Improve array management.

2018-08-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, baloghadamsoftware. `CallDescription` constructor now accepts an `ArrayRef`, instead of two different

[PATCH] D51388: [analyzer] Legalize state manager factory injection.

2018-08-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, baloghadamsoftware. When a checker maintains a program state trait that isn't a simple list/set/map, but is a

[PATCH] D51385: [analyzer] InnerPointerChecker: Fix a segfault.

2018-08-28 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added a comment. > Return value of `dyn_cast_or_null` should be checked before use. Otherwise we > may put a null pointer into the map as a key and eventually crash in > `checkDeadSymbols`. Hm, so with the last `CallDescription` patch we removed some code here that essentially

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/Headers/mm_malloc.h:42 extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size); +extern "C" void(free)(void *ptr); +extern

[PATCH] D51265: Headers: fix collisions with .h files of other projects

2018-08-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Can you give the text of the error messages? If you're seeing a "typedef redefinition with different types" error, libclang is getting confused about the target. And parsing code for the wrong target cannot work in general. Repository: rC Clang

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. +@aaron.ballman for attributes-related changes. It would be easier and more precise to track the macro corresponding to an attribute in the `Parser` rather than in `Sema` (and stash it on the `ParsedAttr` for consumers such as `Sema` that want it). That way, we still

r340879 - [X86] Add kadd intrinsics to match gcc and icc.

2018-08-28 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Aug 28 15:32:14 2018 New Revision: 340879 URL: http://llvm.org/viewvc/llvm-project?rev=340879=rev Log: [X86] Add kadd intrinsics to match gcc and icc. This adds the following intrinsics: _kadd_mask64 _kadd_mask32 _kadd_mask16 _kadd_mask8 These are missing from the

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-28 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Ping. Repository: rUNW libunwind https://reviews.llvm.org/D50564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc);

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/AST/TypePrinter.cpp:1370 + +// Remove the underlying address space so it won't be printed. +SplitQualType SplitTy = T->getModifiedType().split(); rsmith wrote: > This is unnecessary; just print the

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-08-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 162966. leonardchan marked 3 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D51329 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Lex/Preprocessor.h lib/AST/ASTContext.cpp

[PATCH] D51385: [analyzer] InnerPointerChecker: Fix a segfault.

2018-08-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, baloghadamsoftware. Return value of `dyn_cast_or_null` should be checked before use. Otherwise we may put a

[PATCH] D51382: [MinGW] Don't mark external variables as DSO local

2018-08-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:737 +// potentially could come from another DLL as DSO local. +if (GV->hasExternalLinkage() && GV->isDeclaration() && +isa(GV) && !GV->isThreadLocal()) I think this linkage and

[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives

2018-08-28 Thread Ravi Narayanaswamy via Phabricator via cfe-commits
RaviNarayanaswamy added a comment. Is there a way to tell if the header files have matching omp declare target/omp end declare target. The reason is if one of the header files is missing a matching omp end declare target all files which include it will end up having everything marked with

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-08-28 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/cxx-uninitialized-object-inheritance.cpp:802 +struct DynTBase2 { + int x; // expected-note{{uninitialized field 'static_cast(this->bptr)->DynTBase2::x'}} +}; NoQ wrote: > Mmm, what's the value of

[PATCH] D51336: [HIP] Fix output file extension

2018-08-28 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340873: [HIP] Fix output file extension (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D51336 Files: lib/Driver/Action.cpp test/Driver/hip-output-file-name.hip

r340873 - [HIP] Fix output file extension

2018-08-28 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Aug 28 14:09:09 2018 New Revision: 340873 URL: http://llvm.org/viewvc/llvm-project?rev=340873=rev Log: [HIP] Fix output file extension OffloadBundlingJobAction constructor accepts a list of JobAction as inputs. The host JobAction is the last one. The file type of

[PATCH] D51382: [MinGW] Don't mark external variables as DSO local

2018-08-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, pcc. Since MinGW supports automatically importing external variables from DLLs even without the DLLImport attribute, we shouldn't mark them as DSO local unless we actually know them to be local for sure. Keep marking thread local

[PATCH] D51381: [clang-tidy] fix check_clang_tidy to properly mix CHECK-NOTES and CHECK-MESSAGES

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: alexfh, aaron.ballman, lebedev.ri, hokein. Herald added subscribers: cfe-commits, xazax.hun. This patch adjusts the check_clang_tidy.py script to tolerate warnings in the codepath that checks for notes. Checking for warnings itself

[PATCH] D51380: Fix incorrect usage of std::error_category

2018-08-28 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea created this revision. aganea added reviewers: ilya-biryukov, zturner. Herald added a subscriber: cfe-commits. As mentionned here , this change prevents a dangling pointer in `std:error_code` by using a singleton. Repository: rC Clang

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 162950. JonasToth added a comment. - [Test] use CHECK-NOTES again based on the fix in check_clang_tidy Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48714 Files: clang-tidy/hicpp/ExceptionBaseclassCheck.cpp

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-08-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 162942. Charusso marked an inline comment as done. Charusso retitled this revision from "[clang-tidy] New checker for not null-terminated result caused by strlen or wcslen" to "[clang-tidy] New checker for not null-terminated result caused by strlen(),

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a subscriber: lebedev.ri. JonasToth added a comment. I had to revert the `CHECK-NOTES` change that @lebedev.ri introduced with his revision. It fails the test, i think there is an inconsistency or so in the check-clang-tidy script. I will try to figure out whats the issue.

[PATCH] D48714: [clang-tidy] fix PR37913, templated exception factory diagnosed correctly

2018-08-28 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 162945. JonasToth added a comment. - [Misc] comment the matcher to better understand it - [Fix] adjust the test cases to properly function now Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48714 Files:

[PATCH] D51331: [OPENMP] Create non-const ident_t structs.

2018-08-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. When is ITT Notify used? Does it have some preconditions like debug info, some optimizations level etc.? https://reviews.llvm.org/D51331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

2018-08-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yup, looks correct to me! Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:448-449 Loc ThisLoc =

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 162940. teemperor marked an inline comment as done. teemperor added a comment. - Reverted unintended change to test case that slipped into the latest diff. https://reviews.llvm.org/D43871 Files: lib/Headers/mm_malloc.h lib/Sema/SemaExceptionSpec.cpp

[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives

2018-08-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D51378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51378: [OPENMP] Add support for nested 'declare target' directives

2018-08-28 Thread Patrick Lyster via Phabricator via cfe-commits
patricklyster created this revision. patricklyster added reviewers: ABataev, Hahnfeld, RaviNarayanaswamy, mikerice, kkwli0, hfinkel, gtbercea. Herald added subscribers: cfe-commits, guansong. Add the capability to nest multiple declare target directives - including header files within a declare

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ProtocolHandlers.cpp:70 Register("textDocument/hover", ::onHover); + Register("textDocument/typeHierarchy", ::onTypeHierarchy); Register("textDocument/documentSymbol", ::onDocumentSymbol); LSP doesn't

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-08-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/cxx-uninitialized-object-inheritance.cpp:802 +struct DynTBase2 { + int x; // expected-note{{uninitialized field 'static_cast(this->bptr)->DynTBase2::x'}} +}; Mmm, what's the value of casting to derived type

Re: [PATCH] D51358: [driver] Do not pass "-flavor old-gnu" option to LLD linker

2018-08-28 Thread Eric Christopher via cfe-commits
LGTM On Tue, Aug 28, 2018, 7:49 AM Simon Atanasyan via Phabricator < revi...@reviews.llvm.org> wrote: > atanasyan created this revision. > atanasyan added reviewers: echristo, ruiu. > > The "-flavor old-gnu" option were introduced to enable old version of LLD > ELF linker implementation. This

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. Thanks for the detailed feedback; I’ll try to get a new patch up in a few hours. However I disagree with some of them (see replies). Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:124 +// Determine whether the given file path is the

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162932. hugoeg added a comment. merge conflicts resolved @aaron.ballman https://reviews.llvm.org/D51132 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/RedundantStrcatCallsCheck.cpp

[PATCH] D51333: Diagnose likely typos in include statements

2018-08-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:476 + ExtWarn<"likely typo, expected \"FILENAME\" or " + "but filename is '%0'">, InGroup; + This seems like the wrong warning group for this diagnostic as it doesn't

r340867 - Revert "[libFuzzer] Port to Windows"

2018-08-28 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Tue Aug 28 12:07:24 2018 New Revision: 340867 URL: http://llvm.org/viewvc/llvm-project?rev=340867=rev Log: Revert "[libFuzzer] Port to Windows" This reverts commit r340860 due to failing tests. Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Modified:

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D51132#1215916, @hugoeg wrote: > @aaron.ballman when you get the chance could you take another look at this > and commit if it is ready? My internship ends rather soon and this is a tad > time sensitive. Thank you for your time! When

[PATCH] D51372: FENV_ACCESS support for libm-style constrained intrinsics

2018-08-28 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added a subscriber: cfe-commits. This builds on https://reviews.llvm.org/D49865 to get #pragma STDC FENV_ACCESS ON to and used by AST handling of function calls to math intrinsics. This now

[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-08-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. ping. Repository: rC Clang https://reviews.llvm.org/D50901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

2018-08-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. ping. Repository: rC Clang https://reviews.llvm.org/D50250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162921. hugoeg added a comment. renamed check as suggested https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/NoInternalDependenciesCheck.cpp

[PATCH] D49244: Always search sysroot for GCC installs

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think `-gcc-toolchain`, if specified, should simply be taken as the location of the GCC toolchain; we should never go looking for it anywhere else if `-gcc-toolchain` is specified. So I think the patch is not quite right as-is, as it also affects that case. I think

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc); InitializationKind InitKind = InitializationKind::CreateDirect(Loc, Loc, Loc);

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 162918. vsk marked 2 inline comments as done. vsk added a comment. Address the latest round of review feedback. https://reviews.llvm.org/D50927 Files: clang/lib/Sema/SemaLambda.cpp clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp

r340860 - [libFuzzer] Port to Windows

2018-08-28 Thread Matt Morehouse via cfe-commits
Author: morehouse Date: Tue Aug 28 11:34:32 2018 New Revision: 340860 URL: http://llvm.org/viewvc/llvm-project?rev=340860=rev Log: [libFuzzer] Port to Windows Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer

[PATCH] D51221: [clangd] Some nitpicking around the new split (preamble/main) dynamic index

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added inline comments. Comment at: clangd/ClangdServer.cpp:122 + // - symbols declared both in the main file and the preamble + // (Note that symbols *only* in the main file are not indexed). FileIndex MainFileIdx;

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for fixing this! Mostly just picky style comments. In particular, I know that some of the other maintainers here are just as ignorant of the cl driver as I am, and I want to make sure that it's still possible to follow the logic and debug unrelated problems

r340854 - Define variables in test case rather than using values from functions

2018-08-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Aug 28 11:18:01 2018 New Revision: 340854 URL: http://llvm.org/viewvc/llvm-project?rev=340854=rev Log: Define variables in test case rather than using values from functions emitted ealier. Modified: cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm Modified:

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162908. nickdesaulniers added a comment. - Take rsmith's sugguested wording. Add info about __GNUC_STDC_INLINE__. Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D51239: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340849: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators (authored by vedantk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r340849 - [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Aug 28 11:01:42 2018 New Revision: 340849 URL: http://llvm.org/viewvc/llvm-project?rev=340849=rev Log: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators It seems like an oversight that this check was not always enabled for on-device or device simulator

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor marked 3 inline comments as done. teemperor added inline comments. Comment at: test/CXX/except/except.spec/libc-empty-except.cpp:6 +#include "libc-empty-except.h" + +void f() { bruno wrote: > In a testcase like this but using the actual real headers,

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-08-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 162902. teemperor added a comment. - Now using UpdateExceptionSpec. - Added a comment to the SemaExceptionSpec.cpp code why we are permitting this. https://reviews.llvm.org/D43871 Files: lib/Headers/mm_malloc.h lib/Sema/SemaExceptionSpec.cpp

[PATCH] D51291: [clangd] Support multiple #include headers in one symbol.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! I reduced the scope of the patch. PTAL Comment at: clangd/CodeComplete.cpp:1396 + if (IndexResult && !IndexResult->IncludeHeaders.empty()) { +for (const auto : IndexResult->IncludeHeaders) +

[PATCH] D51291: [clangd] *Prototype* Support multiple #include headers in one symbol.

2018-08-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 162897. ioeric marked 3 inline comments as done. ioeric retitled this revision from "[clangd] Support multiple #include headers in one symbol." to "[clangd] *Prototype* Support multiple #include headers in one symbol.". ioeric edited the summary of this

r340845 - [Driver] Delete last reference of lld -flavor old-gnu

2018-08-28 Thread Fangrui Song via cfe-commits
Author: maskray Date: Tue Aug 28 10:20:28 2018 New Revision: 340845 URL: http://llvm.org/viewvc/llvm-project?rev=340845=rev Log: [Driver] Delete last reference of lld -flavor old-gnu This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158. Modified:

[PATCH] D51239: [ubsan] Enable -fsanitize=vptr on Apple devices and simulators

2018-08-28 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Driver/fsanitize.c:426 +// RUN: %clang -target arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162895. hugoeg marked 3 inline comments as done. hugoeg added a comment. fixed issues outlines in comments https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I still thik will be good idea to rename check (deps -> dependencies). https://reviews.llvm.org/D50542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for looking into this. Would be cool to get this supported after the proposal is finalized. Comment at: clangd/Protocol.h:891 + + std::vector Parents; + What is the proposal to add children (i.e. overriden methods) to

[PATCH] D51333: Diagnose likely typos in include statements

2018-08-28 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added subscribers: aaron.ballman, erikjv, modocache. modocache added reviewers: aaron.ballman, erikjv. modocache added a comment. This looks good to me, but maybe some people who've modified this part of the codebase before could review this as well? @aaron.ballman added a fix-it for

[PATCH] D50438: [clangd] Sort GoToDefinition results.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delays with this review Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50438: [clangd] Sort GoToDefinition results.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Herald added a subscriber: kadircet. Comment at: clangd/XRefs.cpp:105 +// Sort results. Declarations being referenced explicitly come first. +std::sort(Result.begin(), Result.end(), + [](const DeclInfo , const DeclInfo )

[PATCH] D51302: [OpenCL] Relax diagnostics on OpenCL access qualifiers

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/SemaOpenCL/access-qualifier.cl:107 + +kernel void image_wo_twice(write_only write_only image1d_t i){} // expected-warning {{duplicate

[PATCH] D51296: [Sema] Traverse vector types for ocl extensions support

2018-08-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Could you please change the commit title tag: [Sema] -> [OpenCL] Comment at: lib/Sema/Sema.cpp:42 #include "llvm/ADT/SmallSet.h" + using namespace

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL340838: Parse compile commands lazily in InterpolatingCompilationDatabase (authored by ibiryukov, committed by ). Herald

r340838 - Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Tue Aug 28 09:15:56 2018 New Revision: 340838 URL: http://llvm.org/viewvc/llvm-project?rev=340838=rev Log: Parse compile commands lazily in InterpolatingCompilationDatabase Summary: This greatly reduces the time to read 'compile_commands.json'. For Chromium on my machine

[PATCH] D51359: Adding HardLink Support to VirtualFileSystem.

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the change. Having something like this makes total sense. Mutating existing in-memory nodes looks shaky and requires making `Status` mutable, which also looks undesirable. Maybe we could consider adding a new kind of `InMemoryNode` for hard links that

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg marked an inline comment as done. hugoeg added inline comments. Comment at: test/clang-tidy/Inputs/absl/external-file.h:1 +void DirectAcess2() { absl::strings_internal::InternalFunction(); } + hokein wrote: > The file can not self-compile, and we should

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. kbobyrev added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Instead of parsing and compiling the `llvm::Regex` each time, it's faster to use basic string matching for filename prefix check.

[PATCH] D51321: [Tooling] Improve handling of CL-style options

2018-08-28 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 162872. hamzasood added a comment. - Re-uploaded with full context. Yeah, I encountered these issues while using clangd on Windows. I haven't run into any clangd issues after applying this patch, but admittedly my usage is very basic (pretty much just

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/Inputs/absl/external-file.h:1 +void DirectAcess2() { absl::strings_internal::InternalFunction(); } + The file can not self-compile, and we should make it compilable. And put the newly-added code at the

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. @aaron.ballman when you get the chance could you take another look at this and commit if it is ready? My internship ends rather soon and this is a tad time sensitive and I don't have commit access. Thank you for your time! https://reviews.llvm.org/D51061

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. @aaron.ballman when you get the chance could you take another look at this and commit if it is ready? My internship ends rather soon and this is a tad time sensitive. Thank you for your time! https://reviews.llvm.org/D51132

[PATCH] D51311: (WIP) Type hierarchy

2018-08-28 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/Protocol.h:889 + // Does this node implement the method targeted by the request? + bool DeclaresMethod; + kadircet wrote: > I think comment and the name is in contradiction here, do you mean > DefinesMethod?

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162868. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Cleanups Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340828: [clangd] Switch to Dex by default for the static index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r340828 - [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Tue Aug 28 07:55:05 2018 New Revision: 340828 URL: http://llvm.org/viewvc/llvm-project?rev=340828=rev Log: [clangd] Switch to Dex by default for the static index Dex is now mature enough to be used as the default static index. This patch performs the switch but introduces a

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:127 // Language detected from -x or the filename. - types::ID Type = types::TY_INVALID; + // When set, cannot be TY_INVALID. + llvm::Optional

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162865. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162864. hugoeg marked 2 inline comments as done. hugoeg added a comment. made some major updates after no-namespace landed https://reviews.llvm.org/D50542 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162863. ilya-biryukov added a comment. - Sort Paths, they are different from OriginalPaths, i.e. lowercased. Repository: rC Clang https://reviews.llvm.org/D51314 Files: lib/Tooling/InterpolatingCompilationDatabase.cpp

[PATCH] D51359: Adding HardLink Support to VirtualFileSystem.

2018-08-28 Thread UTKARSH SAXENA via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a subscriber: cfe-commits. Added support of creating a hardlink from one file to another file. After a hardlink is added between two files, both file will have the same: 1. UniqueID (inode) 2. Size 3. Buffer This will bring replay of compilation

[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

2018-08-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 162861. ilya-biryukov added a comment. - Handle TransferableCommands with TY_INVALID type (never transfer -x flag for those) - Add a test with invalid extensions, seen a crash while experimenting - Update the test wrt to the new behavior. Repository:

  1   2   >