[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176148. aprantl added a reviewer: davide. aprantl added a comment. Herald added subscribers: nhaehnle, jvesely. Turns out that my patch had an unintended interaction with the backend diagnostics engine. This is an updated version of the patch that also update

[PATCH] D55132: [CTU] Add asserts to protect invariants

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Repository: rC Clang https://reviews.llvm.org/D55132 Files: lib/CrossTU/CrossTranslationUnit.cpp Index: lib/CrossTU/CrossTranslationU

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176153. ilya-biryukov added a comment. - Fix a comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55124/new/ https://reviews.llvm.org/D55124 Files: include/clang/Sema/Sema.h lib/Parse/ParseExprCXX.cpp lib/Sema

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176152. aprantl added a comment. Remove debugging code accidentally left in the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 Files: include/llvm/IR/DiagnosticInfo.h lib/CodeGen/MachineLoopInfo.

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/ctu-main.c:3-5 +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-pch -o %t/ctudir2/ctu-other.c.ast %S/Inputs/ctu-other.c +// RUN: cp %S/Inputs/externalFnMap2.txt %t/ctudir2/externalFnMap.txt +// RUN: %clang_cc1 -trip

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D52879#1314855 , @mantognini wrote: > Thank you for the detailed review. I'll work on a patch and add you as > reviewer once done (prob. on Monday though). That's fine. Thanks for your contribution ! Repository: rC Cla

[PATCH] D55131: [CTU] Add more lit tests and better error handling

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also, maybe it'd be worth making a CTU directory under `test/Analysis` for CTU related test files. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55131/new/ https://reviews.llvm.org/D55131

[PATCH] D55133: [CTU] Add statistics

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Repository: rC Clang https://reviews.llvm.org/D55133 Files: lib/CrossTU/CrossTranslationUnit.cpp Index: lib/CrossTU/CrossTranslationU

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Adding a few more reviewers since I'm touching the backend diagnostics. The backend change is supposed to be NFC, but it never hurts to have more feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 _

[PATCH] D54952: [clangd] DO NOT SUBMIT. Draft interfaces for build system integration.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/BuildSystem.h:29 +/// Default compilation database used by clangd, based on the build system. +class Integration : public GlobalCompilationDatabase { +public: klimek wrote: > ilya-biryukov wrote: > > klimek

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

Re: [PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via cfe-commits
On Thu, Nov 29, 2018 at 4:06 PM Zachary Turner wrote: > If this is to go in (which I think is still not clear), it definitely > should be limited to clangd. Not using mapped files is an order of > magnitude performance regression for many use cases. > Absolutely, we have to make sure this does no

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. We introduce a strict policy for C++ CTU. It can work across TUs only if the C++ dialects are the same. We neither allow C vs C++ CTU. We do

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1312617 , @lebedev.ri wrote: > Passing-by thought, feel free to ignore: this seems to so far only affect > windows only? > So the fix shouldn't probably pessimize all other arches? (and maybe even > non-clangd)

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/DeclCXX.h:2189 +C.addCVRUQualifiers(CVRU); +C.addQualifiers(getType().getQualifiers()); +return C; The address-space qualifier should get stored in the same way on the `FunctionProtoType`

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 176156. hwright marked 2 inline comments as done. hwright added a comment. Add additional test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abs

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. @JonasToth reminder that you (or somebody else) will need to commit this for me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Original patch description says this: > There are reported cases of non-system files being locked by libclang on > Windows (and likely by other clients as well) What is the nature of the reports? What operation is attempted on the files and fails due to locking? And

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaType.cpp:7232 + if (D.getContext() == DeclaratorContext::TemplateArgContext) +// Do not deduce address space for non-pointee type in template arg. +; I don't understand what you're tryi

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > When building the FileCheck binary with debug info, this patch makes the > build artifacts ~1kb smaller. Nice! Comment at: lib/IR/DiagnosticInfo.cpp:39 #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, Szelethus, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, whisperity. Herald added a reviewer: george.karpenkov. With a new switch

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl marked an inline comment as done. aprantl added inline comments. Comment at: lib/IR/DiagnosticInfo.cpp:39 #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include probinson wrote: > Do we use a case-sensitive sort of incl

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. Oh, and thanks for taking the time to review this. :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini created this revision. mantognini added a reviewer: riccibruno. Herald added subscribers: cfe-commits, kristina, yaxunl. This is a follow-up on https://reviews.llvm.org/D52879, addressing a few issues. This: - adds a FIXME for later improvement for specific builtins: I previously have

[PATCH] D52879: Derive builtin return type from its definition

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Please see https://reviews.llvm.org/D55136 for the patch addressing these issues. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52879/new/ https://reviews.llvm.org/D52879 ___ cfe-commits

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-30 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. >> Would turning asan operator new/delete into weak symbols help? > > The new operator is already a weak symbol in libcxx, so it looks like an ODR > violation, doesn't it? I don't think so. It's just symbol interposition. Every module in the process gets the same defin

r348015 - [clang] Fix rL348006 for windows

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 10:36:31 2018 New Revision: 348015 URL: http://llvm.org/viewvc/llvm-project?rev=348015&view=rev Log: [clang] Fix rL348006 for windows Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp URL: http:/

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. The idea is great! I think this should rather be an -analyzer-config flag, since the actual analysis changes with a new output (refer to `AnalyzerOption`'s doxygen comments).

r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 10:52:51 2018 New Revision: 348020 URL: http://llvm.org/viewvc/llvm-project?rev=348020&view=rev Log: Reverting r347949-r347951 because they broke the test bots. http://lab.llvm.org:8011/builders/clang-cmake-armv8-lld/builds/440/steps/ninja%20check%202/logs/FA

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 9:37 AM Artem Dergachev via Phabricator via cfe-commits wrote: > > NoQ added inline comments. > > > > Comment at: clang/test/Analysis/osobject-retain-release.cpp:27 > + > + static void * operator new(unsigned long size); > + > > NoQ wrote:

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/IR/DiagnosticInfo.cpp:39 #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include aprantl wrote: > probinson wrote: > > Do we use a case-sensitive sort of include files? I thought

r348023 - Updating this test, which changed after the reverts from r348020.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 11:15:07 2018 New Revision: 348023 URL: http://llvm.org/viewvc/llvm-project?rev=348023&view=rev Log: Updating this test, which changed after the reverts from r348020. Modified: cfe/trunk/test/Misc/pragma-attribute-supported-attributes-list.test Modified:

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Thanks and sorry about the trouble. I’ll recommit with size_t. > On Nov 30, 2018, at 10:56 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at 9:37 AM Artem Dergachev via Phabricator via > cfe-commits mailto:cfe-commits@lists.llvm.org>> > wrote: >> >> NoQ added inline comments. >> >> >> ===

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:19 PM George Karpenkov wrote: > > Thanks and sorry about the trouble. I’ll recommit with size_t. No worries, it happens! FYI, I also had to commit r348023 as part of the reverts. ~Aaron > > On Nov 30, 2018, at 10:56 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1314912 , @zturner wrote: > Original patch description says this: > > > There are reported cases of non-system files being locked by libclang on > > Windows (and likely by other clients as well) > > What is the nat

r348025 - [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 11:21:35 2018 New Revision: 348025 URL: http://llvm.org/viewvc/llvm-project?rev=348025&view=rev Log: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ## From what I can see, this should be the last patch needed to replicate macro argument expansions.

[PATCH] D52988: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348025: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ## (authored by Szelethus, committed by ). Herald added subscribers: llvm-commits, gamesh411. Changed prior to commit: https://reviews.

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-30 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. The Verifier patch has landed as https://reviews.llvm.org/rL348022 I do not have any more knowledge than the reviewers of the right way to handle providing source for remapped files, but at least compilation will warn and strip debug-info rather than segfault when

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Thanks I’ll take a look. BTW when reverting could you use “git revert” or mention manually the phabricator revision being reverted, and apply reverts atomically? I (and many others) work exclusively using a git monorepo, so I don’t even have a straightforward way to lookup what "r347951” is. Th

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. We can work around it by reading the whole file, but it looks like a bug in QtCreator to me. We have the file mapped, but maybe when they open the file to save it, *they* are opening the file without `FILE_SHARE_READ`. It's a logical thing to do on the surface, becaus

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:26 PM George Karpenkov wrote: > > Thanks I’ll take a look. > > BTW when reverting could you use “git revert” or mention manually the > phabricator revision being reverted, > and apply reverts atomically? > I (and many others) work exclusively using a git monorepo, so I d

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 176172. martong added a comment. - Add lit tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55134/new/ https://reviews.llvm.org/D55134 Files: include/clang/Basic/DiagnosticCrossTUKinds.td include/clang/CrossTU/CrossTr

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread David Green via cfe-commits
Hello! Did you intend to change the .gitignore here too? Cheers Dave From: cfe-commits on behalf of Aaron Ballman via cfe-commits Sent: 30 November 2018 18:52:51 To: cfe-commits@lists.llvm.org Subject: r348020 - Reverting r347949-r347951 because they broke

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl created this revision. aprantl added reviewers: dblaikie, davide. aprantl added a project: debug-info. This adds a callback to `PrintingPolicy` to allow `CGDebugInfo` to remap file paths according to `-fdebug-prefix-map`. Otherwise the debug info (particularly function names for C++ lamb

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176174. aprantl added a comment. fix a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55137/new/ https://reviews.llvm.org/D55137 Files: include/clang/AST/PrettyPrinter.h lib/AST/TypePrinter.cpp lib/CodeGen/CGDebugInfo.cpp lib/CodeGe

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Good idea about using the mailing list, thanks, I’ll do that! > On Nov 30, 2018, at 11:30 AM, Aaron Ballman wrote: > > On Fri, Nov 30, 2018 at 2:26 PM George Karpenkov wrote: >> >> Thanks I’ll take a look. >> >> BTW when reverting could you use “git revert” or mention manually the >> phabric

r348026 - Revert an inadvertent change from r348020.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 11:32:35 2018 New Revision: 348026 URL: http://llvm.org/viewvc/llvm-project?rev=348026&view=rev Log: Revert an inadvertent change from r348020. Modified: cfe/trunk/.gitignore Modified: cfe/trunk/.gitignore URL: http://llvm.org/viewvc/llvm-project/cfe/tr

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread Aaron Ballman via cfe-commits
On Fri, Nov 30, 2018 at 2:31 PM David Green wrote: > > Hello! > > > Did you intend to change the .gitignore here too? No! That's a great catch, sorry about that -- VS integration with CMake is rather broken without that manual change to .gitignore. :-( I've restored it in r348026 -- sorry for the

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D53153#1314798 , @rjmccall wrote: > You still have the same linkage model for those other languages, right? > Ultimately there's something like a kernel function that has to be declared > specially and which becomes the

Re: r348020 - Reverting r347949-r347951 because they broke the test bots.

2018-11-30 Thread David Green via cfe-commits
Thanks for the fix, And thanks for the work keeping the bots green! Dave From: Aaron Ballman Sent: 30 November 2018 19:35 To: David Green Cc: cfe-commits; nd Subject: Re: r348020 - Reverting r347949-r347951 because they broke the test bots.   On Fri, Nov 30, 2018 at 2:31 PM David Green w

[PATCH] D55134: [CTU] Add triple/lang mismatch handling

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Hah. Do we support CTU for other languages, like ObjC and ObjC++? Can this be an issue there? Comment at: lib/CrossTU/CrossTranslationUnit.cpp:59 +} +} + `// end of namespace llvm` Comment at: lib/CrossTU/CrossTran

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: hokein, kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, mgorny. Memory-mapping files on Windows leads to them being locked and prevents editors from saving changes to those files on disk. This is fine for t

r348028 - Expect mixed path separators in FileManagerTest when resolving paths on Win32

2018-11-30 Thread Matthew Voss via cfe-commits
Author: ormris Date: Fri Nov 30 11:52:50 2018 New Revision: 348028 URL: http://llvm.org/viewvc/llvm-project?rev=348028&view=rev Log: Expect mixed path separators in FileManagerTest when resolving paths on Win32 Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified: cfe/trunk/unitt

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1315024 , @zturner wrote: > We can work around it by reading the whole file, but it looks like a bug in > QtCreator to me. We have the file mapped, but maybe when they open the file > to save it, *they* are openi

Re: [PATCH] Add myself as code owner for OpenBSD driver

2018-11-30 Thread Richard Smith via cfe-commits
LGTM Thanks, welcome aboard :) On Thu, 29 Nov 2018, 06:01 Brad Smith via cfe-commits < cfe-commits@lists.llvm.org wrote: > Add myself as code owner for OpenBSD driver. > > > Index: CODE_OWNERS.TXT > === > --- CODE_OWNERS.TXT (re

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D53153#1315039 , @scott.linder wrote: > In D53153#1314798 , @rjmccall wrote: > > > You still have the same linkage model for those other languages, right? > > Ultimately there's somethi

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D53153#1315107 , @yaxunl wrote: > In D53153#1315039 , @scott.linder > wrote: > > > In D53153#1314798 , @rjmccall > > wrote: > > > > > You still

[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov marked an inline comment as done. george.karpenkov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RetainSummaryManager.cpp:483-497 case CE_Function: Summ = getFunctionSummary(cast(Call).getDecl()); break; case CE_CXXMember:

r348029 - We're in a constant context in the ConstantEmitter.

2018-11-30 Thread Bill Wendling via cfe-commits
Author: void Date: Fri Nov 30 12:40:06 2018 New Revision: 348029 URL: http://llvm.org/viewvc/llvm-project?rev=348029&view=rev Log: We're in a constant context in the ConstantEmitter. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/test/CodeGen/builtin-constant-p.c Modified:

r348030 - Revert "Reverting r347949-r347951 because they broke the test bots."

2018-11-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Nov 30 12:43:42 2018 New Revision: 348030 URL: http://llvm.org/viewvc/llvm-project?rev=348030&view=rev Log: Revert "Reverting r347949-r347951 because they broke the test bots." This reverts commit 5bad6129c012fbf186eb055be49344e790448ecc. Hopefully fixing the i

r348031 - [analyzer] Evaluate all non-checker config options before analysis

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 12:44:00 2018 New Revision: 348031 URL: http://llvm.org/viewvc/llvm-project?rev=348031&view=rev Log: [analyzer] Evaluate all non-checker config options before analysis In earlier patches regarding AnalyzerOptions, a lot of effort went into gathering all config o

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread George Karpenkov via cfe-commits
Pushed the fix. Again, sorry for the trouble. > On Nov 30, 2018, at 11:34 AM, George Karpenkov via cfe-commits > wrote: > > Good idea about using the mailing list, thanks, I’ll do that! > >> On Nov 30, 2018, at 11:30 AM, Aaron Ballman wrote: >> >> On Fri, Nov 30, 2018 at 2:26 PM George Karpe

[PATCH] D53692: [analyzer] Evaluate all non-checker config options before analysis

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348031: [analyzer] Evaluate all non-checker config options before analysis (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D53692?vs=172856&id=176183#toc Repos

Re: [PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-30 Thread Artem Dergachev via cfe-commits
Hmm, they don't have git-svn-id lines in the monorepo, which are handy for exactly that. In the multirepos i usually just /search the git log for the svn commit (without "r") and it quickly matches the git-svn-id line, eg.: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347951 // <==

r348032 - Revert r348029. I was git-ing and jumped the gun.

2018-11-30 Thread Bill Wendling via cfe-commits
Author: void Date: Fri Nov 30 12:44:11 2018 New Revision: 348032 URL: http://llvm.org/viewvc/llvm-project?rev=348032&view=rev Log: Revert r348029. I was git-ing and jumped the gun. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/test/CodeGen/builtin-constant-p.c Modified: cf

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Can't say I know much abouth the path remapping functionality - what it's used for, where it's implemented in general, etc - so figure someone with more of that knowledge might be best off reviewing this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55137/new

[PATCH] D54995: [MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks

2018-11-30 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov What do you think about the global settable bool in MemoryBuffer in place of the ifdef from https://reviews.llvm.org/D35200 ? In this case the client on Windows can set it and you're safe that any MemoryBuffer call never mmaps. CHANGES SINCE LAST ACTION

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:238 + // Apply -fdebug-prefix-map. + PP.RemapFilePaths = true; + PP.remapPath = [this](StringRef Path) { return remapDIPath(Path); }; Unconditionally? CHANGES SINCE LAST ACTION https:

r348033 - Adding tests for -ast-dump; NFC.

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 12:55:26 2018 New Revision: 348033 URL: http://llvm.org/viewvc/llvm-project?rev=348033&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for struct and union declarations in C. It also points out a bug when dumping anonymous record types -- they

r348037 - [ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417)

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 13:15:41 2018 New Revision: 348037 URL: http://llvm.org/viewvc/llvm-project?rev=348037&view=rev Log: [ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417) Summary: Reinstate the original behavior (Success(false, E)) before D54355 when this branch

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-11-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. So far everything looks fine, but I have to rerun a couple of things due to infrastructural issues. I should have the final results next Monday. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54630/new/ https://reviews.llvm.org/D54630

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 6 inline comments as done. Szelethus added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:367 - parseAnalyzerConfigs(Opts, Diags); + if (Opts.ShouldEmitErrorsOnInvalidConfigValue) +parseAnalyzerConfigs(Opts, &Diags); xaz

r348038 - [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 13:24:31 2018 New Revision: 348038 URL: http://llvm.org/viewvc/llvm-project?rev=348038&view=rev Log: [analyzer] Emit an error for invalid -analyzer-config inputs Differential Revision: https://reviews.llvm.org/D53280 Added: cfe/trunk/test/Analysis/invalid-a

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked an inline comment as done. Closed by commit rC348038: [analyzer] Emit an error for invalid -analyzer-config inputs (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org

r348039 - Revert r347417 "Re-Reinstate 347294 with a fix for the failures."

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 13:26:09 2018 New Revision: 348039 URL: http://llvm.org/viewvc/llvm-project?rev=348039&view=rev Log: Revert r347417 "Re-Reinstate 347294 with a fix for the failures." Kept the "indirect_builtin_constant_p" test case in test/SemaCXX/constant-expression-cxx1y.cpp w

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In D55137#1315133 , @dblaikie wrote: > Can't say I know much abouth the path remapping functionality - what it's > used for, where it's implemented in general, etc - so figure someone with > more of that knowledge might be best o

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 176194. aprantl added a comment. Only initialize `RemapFilePaths` when `DebugPrefixMap` is nonempty. Should be slightly faster. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55137/new/ https://reviews.llvm.org/D55137 Files: include/clang/AST/Pre

r348041 - Add myself as code owner for OpenBSD driver

2018-11-30 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Nov 30 13:42:34 2018 New Revision: 348041 URL: http://llvm.org/viewvc/llvm-project?rev=348041&view=rev Log: Add myself as code owner for OpenBSD driver Modified: cfe/trunk/CODE_OWNERS.TXT Modified: cfe/trunk/CODE_OWNERS.TXT URL: http://llvm.org/viewvc/llvm-project/cfe

[PATCH] D55137: Honor -fdebug-prefix-map when creating function names for the debug info.

2018-11-30 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM aside from a grump about the test, which is totally up to you. Comment at: test/CodeGenCXX/debug-prefix-map-lambda.cpp:7 + // CHECK: !DISubprogram(name: "b<(lambd

[PATCH] D53701: [Analyzer] Record and process comparison of symbols instead of iterator positions in interator checkers

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: gamesh411. In D53701#1288682 , @baloghadamsoftware wrote: > I am almost sure it is implossible. It is not only about iterator-adapters in > the classical sense but also any iterator that internally deals wi

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please close PR30233 after committing patch. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54757/new/ https://reviews.llvm.org/D54757 ___ cfe-commits mailing list cfe-com

[PATCH] D53754: [Analyzer] Skip symbolic regions based on conjured symbols in comparison of the containers of iterators

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. What makes you think that conjured symbols are special? Doesn't the same problem appear in the following example?: void foo(std::vector &v1, std::vector &v2) { v2.erase(v1.cbegin()); } In this example if `foo()` is analyzed as a top level function, the respective s

[PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 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. Makes perfect sense to me! Comment at: test/Analysis/iterator-range.cpp:190 + auto i0 = L.begin(); + --i0; // expected-warning{{Iterator accessed outside of its range}} +} -

Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 Thread Roman Lebedev via cfe-commits
""Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers" Is it be or that reads backwards? Why can't you increment past the begin()? Can you decrement past the begin() instead? And the opposite for the end(). On Sat, Dec 1,

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 176204. leonardchan marked 6 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics &Other) const; + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > Actually representing t

Re: [PATCH] D53812: [Analyzer] Iterator Checker - Forbid increments past the begin() and decrements past the end() of containers

2018-11-30 Thread Artem Dergachev via cfe-commits
I suspect that the point is that previously we believed that decrementing below begin and than *incrementing* it back to begin() would yield begin(), but now we disallow this "incrementing back" behavior and warn immediately on decrement because in fact it's already UB. Though, yeah, the title

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 176206. stephanemoore marked an inline comment as done. stephanemoore added a comment. Re-formatted google-objc-function-naming.mm to LLVM style. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55101/new/ ht

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-30 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D55101#1314716 , @benhamilton wrote: > IMHO we should just disable this check entirely for C++ files (including > Objective-C++). > > Since Objective-C++ files will have a mix of the Google Objective-C and > Google C++ s

r348044 - [analyzer] Deleting unnecessary test file

2018-11-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Fri Nov 30 14:32:17 2018 New Revision: 348044 URL: http://llvm.org/viewvc/llvm-project?rev=348044&view=rev Log: [analyzer] Deleting unnecessary test file That I really should've done in rC348031. Removed: cfe/trunk/test/Analysis/analyzer-config.cpp Removed: cfe/trunk

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-11-30 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. PTAL, it's a single line change, I just need someone to confirm that I'm not mistaken :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55066/new/ https://reviews.llvm.org/D55066 ___ cfe-commi

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Would you be okay with landing this fix and if we get any further reports for > Objective-C++ sources then we can suppress it in all C++/Objective-C++ > sources? I think there is enough value to enforcing the naming conventions on > non-namespaced C functions in O

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-11-30 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added reviewers: rsmith, chandlerc. Herald added a subscriber: arphaman. This warning, Wexperimental-driver-option, is on by default, exempt from -Werror, and may be disabled. Additionally, change the documentation to note that these options are not intend

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-11-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a subscriber: donat.nagy. Szelethus added a comment. I see your point, but here's why I think it isn't a bug: I like to see macros as `constexpr` variables, and if I used those instead, I personally wouldn't like to get a warning just because they have the same value. In C, silen

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-11-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 176214. ahatanak added a comment. Herald added a subscriber: jkorous. Rebase & ping. I've reverted the changes I made to test/SemaCUDA/call-host-fn-from-device.cu since r342749 fixed the overload resolution bug. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D54149: [Analyzer] [WIP] Standard C++ library functions checker for the std::find() family

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: gamesh411. Such checker is useful. It'd be great to add a lot of "pure" functions into it, simply for the sake of pointing out that they have no side effects, i.e. avoid unnecessary invalidation. The bound-to-argument constraint is useful. It avoi

[PATCH] D54401: [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: alexfh. NoQ added a comment. The code looks good, but i vaguely remember that we might accidentally break clang-tidy integration that uses this API to enable/disable specific checkers via `-checks=-analyzer-...`. *summons @alexfh* CHANGES SINCE LAST ACTION https://re

r348053 - Revert "Revert r347417 "Re-Reinstate 347294 with a fix for the failures.""

2018-11-30 Thread Fangrui Song via cfe-commits
Author: maskray Date: Fri Nov 30 15:41:18 2018 New Revision: 348053 URL: http://llvm.org/viewvc/llvm-project?rev=348053&view=rev Log: Revert "Revert r347417 "Re-Reinstate 347294 with a fix for the failures."" It seems the two failing tests can be simply fixed after r348037 Fix 3 cases in Analysi

[PATCH] D54436: [analyzer][NFC] Move CheckerRegistry from the Core directory to Frontend

2018-11-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Thanks for the cleanup! One thing to test here is whether this works (or, at least, builds) when compiling clang without the analyzer. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54436/new/ https://reviews.llvm

<    1   2   3   >