[PATCH] D49275: Thread safety: Run tests with both lock and capability attributes

2018-07-12 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: delesley, aaron.ballman. Herald added a subscriber: cfe-commits. Running all tests with both sets of attributes should make sure there is no regression in either variant. Repository: rC Clang https://reviews.llvm.org/D49275

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuilder.h:260 +CharUnits::fromQuantity(Offset.getSExtValue(; + } + Not sure about the new helper. We already have CreateStructGEP and CreateConstArrayGEP which do

[PATCH] D49227: Override a bit fields layout from an external source

2018-07-12 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: test/CodeGenCXX/override-bit-field-layout.cpp:5-12 +struct S { + short a : 3; + short b : 5; +}; + +void use_structs() { + S ss[sizeof(S)];

r336962 - PR38136: improve handling of template argument deduction of non-trailing

2018-07-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 12 16:32:39 2018 New Revision: 336962 URL: http://llvm.org/viewvc/llvm-project?rev=336962=rev Log: PR38136: improve handling of template argument deduction of non-trailing function parameter packs. This makes our handling of non-trailing function parameter packs

[PATCH] D49227: Override a bit fields layout from an external source

2018-07-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai resigned from this revision. smeenai added a comment. I'm not familiar enough with this to review it. Repository: rC Clang https://reviews.llvm.org/D49227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49274: [CUDA] Provide integer SIMD functions for CUDA-9.2

2018-07-12 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, bkramer. Herald added subscribers: bixia, sanjoy. CUDA-9.2 made all integer SIMD functions into compiler builtins, so clang no longer has access to the implementation of these functions in either headers of libdevice and has to provide its

[PATCH] D48808: [CodeGen] Emit parallel_loop_access for each loop in the loop stack.

2018-07-12 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 155288. Meinersbur added a comment. - Hoist I->mayReadOrWriteMemory() condition. Repository: rC Clang https://reviews.llvm.org/D48808 Files: lib/CodeGen/CGLoopInfo.cpp test/CodeGenCXX/pragma-loop-safety-nested.cpp

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 155287. jfb added a comment. - Fix silly naming and lookup. Repository: rC Clang https://reviews.llvm.org/D49209 Files: lib/CodeGen/CGBuilder.h lib/CodeGen/CGDecl.cpp test/CodeGen/init.c test/CodeGenOpenCL/partial_initializer.cl Index:

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I updated the patch to use `Address`, and also use `inbounds`. This was a bit tricky because of the GEPs. I also updated tests which run into this codegen. Only the following tests actually hit this code, and not all check these stores: Clang ::

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-12 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 155285. jfb marked an inline comment as done. jfb added a comment. - Use Address as suggested in review. Repository: rC Clang https://reviews.llvm.org/D49209 Files: lib/CodeGen/CGBuilder.h lib/CodeGen/CGDecl.cpp test/CodeGen/init.c

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155284. simark added a comment. Remove unintended changes Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49267 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Note, https://reviews.llvm.org/D49265 in clang is a prerequisite. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-12 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: libcxx/include/__hash_table:2165 +#if _LIBCPP_STD_VER > 14 +template +template ldionne wrote: > When a function is declared with a visibility macro > (`_LIBCPP_INLINE_VISIBILITY` in this case), I think it is

r336947 - Support linking static PIE binaries on NetBSD

2018-07-12 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Thu Jul 12 14:21:29 2018 New Revision: 336947 URL: http://llvm.org/viewvc/llvm-project?rev=336947=rev Log: Support linking static PIE binaries on NetBSD Modified: cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp cfe/trunk/test/Driver/netbsd.c Modified:

r336946 - PR38141: check whether noexcept-specifications are equivalent in redeclarations

2018-07-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 12 14:11:25 2018 New Revision: 336946 URL: http://llvm.org/viewvc/llvm-project?rev=336946=rev Log: PR38141: check whether noexcept-specifications are equivalent in redeclarations Modified: cfe/trunk/lib/Sema/SemaExceptionSpec.cpp

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. This patch adds support for watching for changes to compile_commands.json, and reparsing files if needed. The watching is done using the "workspace/didChangeWatchedFiles" notification,

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'd also rather stick to integer arithmetic and avoid using floats even in intermediate calculations. It'd be hard to make sure that no rounding errors kick in if we use floats. https://reviews.llvm.org/D49074 ___ cfe-commits

[PATCH] D49265: [Tooling] Add operator== to CompileCommand

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, ioeric, ilya-biryukov. It does the obvious thing of comparing all fields. This will be needed for a clangd patch I have in the pipeline. Repository: rC Clang https://reviews.llvm.org/D49265 Files:

[PATCH] D49188: [OpenMP] Initialize data sharing stack for SPMD case

2018-07-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/nvptx_data_sharing.cpp:33 // CK1: call void @llvm.nvvm.barrier0() -// CK1: call void @__kmpc_data_sharing_init_stack It is better to check that this call is not emitted, like this `CK1-NOT: call void

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Sema/DeclSpec.h:2552-2553 ParsedType InitCaptureType; +SourceLocation LocStart; +SourceLocation LocEnd; + How does `LocStart` relate to the existing source location `Loc`? I think this

[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

2018-07-12 Thread Francois JEAN via Phabricator via cfe-commits
Wawha updated this revision to Diff 155254. Wawha retitled this revision from "[Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call" to "[Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call

r336937 - [Driver] Conform warn_drv_object_size_disabled_O0 to DefaultWarnNoError

2018-07-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Jul 12 12:53:15 2018 New Revision: 336937 URL: http://llvm.org/viewvc/llvm-project?rev=336937=rev Log: [Driver] Conform warn_drv_object_size_disabled_O0 to DefaultWarnNoError This diagnostic triggers when -fsanitize=object-size is explicitly specified but will be a

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:674 + const LocationContext *LC = Context.getLocationContext(); + while ((LC = LC->getParent())) { + george.karpenkov wrote: > nit: could we have `while (LC)`

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > A call to `Derived::Derived()` previously emitted no warnings. However, with > these changes, a warning is emitted for `Base::a`. Yep, a heuristic to skip implicit constructor declarations during analysis and make the first explicit constructor responsible for

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for taking a look! In https://reviews.llvm.org/D48958#1160381, @vsk wrote: > I have some minor comments but overall I think this is in good shape. It > would be great to see some compile-time numbers just to make sure this is > tractable. I'm pretty sure

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D48958#1160435, @lebedev.ri wrote: > Thank you for taking a look! > > In https://reviews.llvm.org/D48958#1160381, @vsk wrote: > > > I have some minor comments but overall I think this is in good shape. It > > would be great to see some

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I have some minor comments but overall I think this is in good shape. It would be great to see some compile-time numbers just to make sure this is tractable. I'm pretty sure -fsanitize=null would fire more often across a codebase than this check, so I don't anticipate a

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D48958#1160479, @vsk wrote: > In https://reviews.llvm.org/D48958#1160435, @lebedev.ri wrote: > > > Thank you for taking a look! > > > > In https://reviews.llvm.org/D48958#1160381, @vsk wrote: > > > > > I have some minor comments but overall

r336922 - [C++11] Fix warning when dropping cv-qualifiers when assigning to a reference with a braced initializer list

2018-07-12 Thread Nicolas Lesser via cfe-commits
Author: rakete Date: Thu Jul 12 10:43:49 2018 New Revision: 336922 URL: http://llvm.org/viewvc/llvm-project?rev=336922=rev Log: [C++11] Fix warning when dropping cv-qualifiers when assigning to a reference with a braced initializer list Modified: cfe/trunk/lib/Sema/SemaInit.cpp

[PATCH] D48325: [analyzer][UninitializedObjectChecker] Support for MemberPointerTypes

2018-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Yay less code. https://reviews.llvm.org/D48325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

2018-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Looks good! Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:691 +StringRef getVariableName(const FieldDecl *Field) { + // If \p Field is a captured lambda variable, Field->getName() will return

r336933 - [Hexagon] Diagnose intrinsics not supported by selected CPU/HVX

2018-07-12 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Thu Jul 12 11:54:04 2018 New Revision: 336933 URL: http://llvm.org/viewvc/llvm-project?rev=336933=rev Log: [Hexagon] Diagnose intrinsics not supported by selected CPU/HVX Added: cfe/trunk/test/Sema/builtins-hexagon-v55.c cfe/trunk/test/Sema/builtins-hexagon-v60.c

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-12 Thread Andrew Comminos via Phabricator via cfe-commits
acomminos updated this revision to Diff 155246. acomminos added a comment. Thanks for the feedback! This diff switches to using a source range for captures provided by the parser, which is more accurate, future-proof, and correctly handles macros. Repository: rC Clang

r336931 - Add tests for function conversions in conversion function template

2018-07-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 12 11:49:13 2018 New Revision: 336931 URL: http://llvm.org/viewvc/llvm-project?rev=336931=rev Log: Add tests for function conversions in conversion function template deduction. Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp

[PATCH] D37442: [C++17] Disallow lambdas in template parameters (PR33696).

2018-07-12 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336930: [C++17] Disallow lambdas in template parameters (PR33696). (authored by Rakete, committed by ). Changed prior to commit: https://reviews.llvm.org/D37442?vs=155240=155243#toc Repository:

[PATCH] D37442: [C++17] Disallow lambdas in template parameters (PR33696).

2018-07-12 Thread Nicolas Lesser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336930: [C++17] Disallow lambdas in template parameters (PR33696). (authored by Rakete, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D37442

r336930 - [C++17] Disallow lambdas in template parameters (PR33696).

2018-07-12 Thread Nicolas Lesser via cfe-commits
Author: rakete Date: Thu Jul 12 11:45:41 2018 New Revision: 336930 URL: http://llvm.org/viewvc/llvm-project?rev=336930=rev Log: [C++17] Disallow lambdas in template parameters (PR33696). Summary: This revision disallows lambdas in template parameters, as reported in PR33696. Reviewers:

[PATCH] D37442: [C++17] Disallow lambdas in template parameters (PR33696).

2018-07-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 155240. Rakete added a comment. Format lines longer than 80 characters correctly. Repository: rC Clang https://reviews.llvm.org/D37442 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp

r336928 - [Tooling] Make standalone executor support user-provided vfs.

2018-07-12 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Jul 12 11:32:11 2018 New Revision: 336928 URL: http://llvm.org/viewvc/llvm-project?rev=336928=rev Log: [Tooling] Make standalone executor support user-provided vfs. Modified: cfe/trunk/include/clang/Tooling/StandaloneExecution.h

[PATCH] D49260: [clangd] JSONTracer: flush after writing event

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, omtcyfz, jkorous, MaskRay, ioeric, ilya-biryukov. Let's say I use "CLANGD_TRACE=/tmp/clangd.json" and "tail -F /tmp/clangd.json", I'll often see unfinished lines, where the rest of the data is still in clangd's output buffer.

[PATCH] D49253: [clangd] Fix category in clangd-vscode's package.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155232. simark added a comment. Oops. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49253 Files: clangd/clients/clangd-vscode/package.json Index: clangd/clients/clangd-vscode/package.json

[PATCH] D39679: [C++11] Fix warning when dropping cv-qualifiers when assigning to a reference with a braced initializer list

2018-07-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete closed this revision. Rakete added a comment. Committed in r336922 :) https://reviews.llvm.org/D39679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r336920 - Revert "[modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts"

2018-07-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Jul 12 10:38:48 2018 New Revision: 336920 URL: http://llvm.org/viewvc/llvm-project?rev=336920=rev Log: Revert "[modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts" This reverts commit f40124d4f05ecf4f880cf4e8f26922d861f705f3 / r336660. This

[PATCH] D49190: [clang-tidy/ObjC] Add SQL to list of acronyms

2018-07-12 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE336919: [clang-tidy/ObjC] Add SQL to list of acronyms (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D49190?vs=155004=155216#toc Repository: rCTE Clang

[clang-tools-extra] r336919 - [clang-tidy/ObjC] Add SQL to list of acronyms

2018-07-12 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Thu Jul 12 10:32:55 2018 New Revision: 336919 URL: http://llvm.org/viewvc/llvm-project?rev=336919=rev Log: [clang-tidy/ObjC] Add SQL to list of acronyms Summary: SQL is a common acronym. Reviewers: Wizard, hokein Reviewed By: Wizard, hokein Subscribers: cfe-commits

[PATCH] D49253: [clangd] Fix category in clangd-vscode's package.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155213. simark added a comment. - [clangd] JSONTracer: flush after writing event Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49253 Files: clangd/Trace.cpp clangd/clients/clangd-vscode/package.json Index:

[PATCH] D49253: [clangd] Fix category in clangd-vscode's package.json

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. When opening package.json, vscode shows: Use 'Programming Languages' instead Replacing "Languages" with this fixes it. Repository: rCTE Clang Tools Extra

[PATCH] D49245: [ASTImporter] Import implicit methods of existing class.

2018-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. When an already existing class is encountered during import, check if it has implicit methods that are missing in the existing one, and import

[PATCH] D49244: Always search sysroot for GCC installs

2018-07-12 Thread David Greene via Phabricator via cfe-commits
greened created this revision. greened added reviewers: rsmith, mcrosier, danalbert. greened added a project: clang. Herald added a subscriber: cfe-commits. Previously, if clang was configured with -DGCC_INSTALL_PREFIX, then it would not search a provided sysroot for a gcc install. This caused

[PATCH] D49063: [libclang] Add support for ObjCObjectType

2018-07-12 Thread Michael Wu via Phabricator via cfe-commits
michaelwu added inline comments. Comment at: include/clang-c/Index.h:35 #define CINDEX_VERSION_MAJOR 0 #define CINDEX_VERSION_MINOR 49 yvvan wrote: > Please, increment the minor version (you are adding new functions) This is one in a series of patches that

r336910 - [Tooling] Get working directory properly without assuming real file system.

2018-07-12 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Jul 12 07:54:25 2018 New Revision: 336910 URL: http://llvm.org/viewvc/llvm-project?rev=336910=rev Log: [Tooling] Get working directory properly without assuming real file system. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp

[PATCH] D49142: [clangd] Extract FileSystemProvider into a separate header. NFC

2018-07-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336909: [clangd] Extract FileSystemProvider into a separate header. NFC (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r336909 - [clangd] Extract FileSystemProvider into a separate header. NFC

2018-07-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jul 12 07:49:52 2018 New Revision: 336909 URL: http://llvm.org/viewvc/llvm-project?rev=336909=rev Log: [clangd] Extract FileSystemProvider into a separate header. NFC Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, ioeric, MaskRay, jkorous,

[PATCH] D49142: [clangd] Extract FileSystemProvider into a separate header. NFC

2018-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/FSProvider.cpp:15 + +IntrusiveRefCntPtr RealFileSystemProvider::getFileSystem() { + return vfs::getRealFileSystem(); seems

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D48903#1159985, @simark wrote: > In https://reviews.llvm.org/D48903#1159303, @ioeric wrote: > > > For example, suppose you have header search directories > > `-I/path/to/include` and `-I.` in your compile command. When preprocessor > >

[PATCH] D49235: [ASTImporter] Import described template (if any) of function.

2018-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. When a function is imported, check if it has a described template. The name lookup is corrected to find the templated entity in this case. The described template of the function is

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D48903#1159303, @ioeric wrote: > For example, suppose you have header search directories `-I/path/to/include` > and `-I.` in your compile command. When preprocessor searches for an #include > "x.h", it will try to stat "/path/to/include/x.h"

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:395 + SmallString<128> RealPathName; + if (!FS->getRealPath(InterndFileName, RealPathName)) +UFE->RealPathName = RealPathName.str(); ioeric wrote: > simark wrote: > > ioeric wrote: > > >

r336901 - [analyzer][UninitializedObjectChecker] Moved non-member functions out of the anonymous namespace

2018-07-12 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Jul 12 06:13:46 2018 New Revision: 336901 URL: http://llvm.org/viewvc/llvm-project?rev=336901=rev Log: [analyzer][UninitializedObjectChecker] Moved non-member functions out of the anonymous namespace As the code for the checker grew, it became increasinly difficult

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D49197#1159704, @ioeric wrote: > In https://reviews.llvm.org/D49197#1158972, @simark wrote: > > > Background: I'm trying to fix the cases why we receive a FileEntry without > > a real path computed in clangd, so we can avoid having to compute

[PATCH] D49228: [analyzer][UninitializedObjectChecker] Void pointer objects are casted back to their dynmic type in note message

2018-07-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. Repository: rC Clang https://reviews.llvm.org/D49228 Files:

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. FTR, this is http://llvm.org/PR38072 Repository: rC Clang https://reviews.llvm.org/D49213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49224: [clangd] log request/response messages with method/ID/error at INFO level

2018-07-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rL336899: [clangd] log request/response messages with method/ID/error at INFO level (authored by sammccall, committed by ). Herald added a subscriber:

[clang-tools-extra] r336899 - [clangd] log request/response messages with method/ID/error at INFO level

2018-07-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jul 12 04:52:18 2018 New Revision: 336899 URL: http://llvm.org/viewvc/llvm-project?rev=336899=rev Log: [clangd] log request/response messages with method/ID/error at INFO level Summary: Bodies are logged at VERBOSE level (since r336785), tweak the formatting.

[PATCH] D49158: [clang-tidy] Fixing segfault when there's no IdentifierInfo

2018-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D49158#1158327, @JonasToth wrote: > Is there a way to add a test, that would trigger the old segfault and show > that it does not happen anymore with this fix? +1, we should have a minimal test case for this fix,

[PATCH] D47946: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336898: [ASTImporter] Fix infinite recursion on function import with struct definition… (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r336898 - [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-12 Thread Gabor Marton via cfe-commits
Author: martong Date: Thu Jul 12 04:50:21 2018 New Revision: 336898 URL: http://llvm.org/viewvc/llvm-project?rev=336898=rev Log: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters Summary: Importing a function having a struct definition in the parameter

[PATCH] D49224: [clangd] log request/response messages with method/ID/error at INFO level

2018-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clangd/JSONRPCDispatcher.cpp:138 }); + auto ID = 1; + log("--> {0}({1})", Method, ID); nit I'd suggest putting this statement

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D49083#1157586, @yaxunl wrote: > In https://reviews.llvm.org/D49083#1157568, @tra wrote: > > > > HIP generates one fat binary for all devices after linking. However, for > > > each compilation > > > unit a ctor function is emitted which

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1694 // handle things like function to ptr-to-function decay etc. Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Expr *E = CE->getSubExpr(); vsk wrote: > lebedev.ri wrote: >

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 155149. lebedev.ri marked 7 inline comments as done. lebedev.ri added a comment. Address @vsk's review notes. - Maintain the stack of currently-being-visited `CastExpr`'s - Use that stack to check whether we are in a `ExplicitCastExpr` - Move logic for

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-07-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:3444 + + verifyFormat("Constructor()\n" + ": (a), b(b) {}", djasper wrote: > I find these tests hard to read and reason about.

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-07-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:760 (!Style.AllowAllParametersOfDeclarationOnNextLine && State.Line->MustBeDeclaration) || +(!Style.AllowAllArgumentsOnNextLine && russellmcc wrote: >

[PATCH] D49227: Override a bit fields layout from an external source

2018-07-12 Thread Aleksandr Urakov via Phabricator via cfe-commits
aleksandr.urakov created this revision. aleksandr.urakov added reviewers: rsmith, mstorsjo, arphaman, whunt, majnemer. aleksandr.urakov added a project: clang. This patch adds a possibility to use an external layout for bit fields. The problem occurred while debugging a Windows application with

[PATCH] D48722: [ASTImporter] Update isUsed flag at Decl import.

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
martong abandoned this revision. martong added a comment. Closed in favor of https://reviews.llvm.org/D47632 Repository: rC Clang https://reviews.llvm.org/D48722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r336896 - [ASTImporter] Refactor Decl creation

2018-07-12 Thread Gabor Marton via cfe-commits
Author: martong Date: Thu Jul 12 02:42:05 2018 New Revision: 336896 URL: http://llvm.org/viewvc/llvm-project?rev=336896=rev Log: [ASTImporter] Refactor Decl creation Summary: Generalize the creation of Decl nodes during Import. With this patch we do the same things after and before a new AST

[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-12 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336896: [ASTImporter] Refactor Decl creation (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D47632?vs=154582=155134#toc

[PATCH] D49224: [clangd] log request/response messages with method/ID/error at INFO level

2018-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. Bodies are logged at VERBOSE level (since r336785), tweak the formatting. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49224

[PATCH] D49223: [AST] Check described template at structural equivalence check.

2018-07-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added a subscriber: cfe-commits. When checking a class or function the described class or function template is checked too. Improved test with symmetric check, added new tests. Repository: rC Clang https://reviews.llvm.org/D49223 Files:

[PATCH] D47946: [ASTImporter] Fix infinite recursion on function import with struct definition in parameters

2018-07-12 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. @martong I don't have commit rights. Thanks for your help in advance. https://reviews.llvm.org/D47946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r336890 - [clangd] Simplify logging wrapper after r336888

2018-07-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jul 12 01:00:21 2018 New Revision: 336890 URL: http://llvm.org/viewvc/llvm-project?rev=336890=rev Log: [clangd] Simplify logging wrapper after r336888 Modified: clang-tools-extra/trunk/clangd/Logger.h Modified: clang-tools-extra/trunk/clangd/Logger.h URL:

[PATCH] D49197: FileManager: Try to compute RealPathName in getVirtualFile

2018-07-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D49197#1158972, @simark wrote: > Background: I'm trying to fix the cases why we receive a FileEntry without a > real path computed in clangd, so we can avoid having to compute it ourselves. I'm curious how you use `getVirtualFile` in your

[PATCH] D49063: [libclang] Add support for ObjCObjectType

2018-07-12 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang-c/Index.h:35 #define CINDEX_VERSION_MAJOR 0 #define CINDEX_VERSION_MINOR 49 Please, increment the minor version (you are adding new functions) Comment at: include/clang-c/Index.h:3644