[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM and a few nits Comment at: include/clang/Basic/FileManager.h:108 + + // Only for use in tests to see if deferred opens are happening, arther than + //

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

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 09:19:06 2018 New Revision: 348008 URL: http://llvm.org/viewvc/llvm-project?rev=348008=rev Log: Adding tests for -ast-dump; NFC. This adds tests for GenericSelectionExpr; note that it points out a minor whitespace bug for selection expression cases.

[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

[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

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-11-30 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz created this revision. sgraenitz added reviewers: aprantl, JDevlieghere, davide, friss, dexonsmith. Herald added a subscriber: mgorny. LLDB.framework wants a copy these headers. With this change LLDB can easily glob for the list of files: get_target_property(clang_include_dir

[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. 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++ styles, I think there will be too many places where we'll hit conflicts like this (there are

[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#1314777 , @scott.linder wrote: > In D53153#1291348 , @rjmccall wrote: > > > In D53153#1289380 , @scott.linder > > wrote: > > > > > I

[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#1314694 , @mantognini wrote: > In D52879#1311177 , @riccibruno > wrote: > > > And moreover I believe this change is subtly incorrect for the following > > reason: > > The

[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

[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] 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

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

2018-11-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Nov 30 07:11:16 2018 New Revision: 347996 URL: http://llvm.org/viewvc/llvm-project?rev=347996=rev Log: Adding tests for -ast-dump; NFC. This adds tests for DeclStmt and demonstrates that we don't create such an AST node for global declarations currently. Added:

[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#1311177 , @riccibruno wrote: > And moreover I believe this change is subtly incorrect for the following > reason: > The type that is passed into the constructor of the call expression is the > type > of the call

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. In general LGTM, as someone who's done a 2-3 conversion of similar scale before. The only suggestion I'd make is to consider changing the `__future__` imports to `from __future__ import absolute_import, division, print_function` I found this gave the best

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:70 +// We keep only the node "Path" and its edges. +IncludeGraph getSubGraph(const URI , const IncludeGraph ) { + IncludeGraph IG; Naming: technically the variable name should be

[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

[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:

[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

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=rev Log: [clang] Fix rL348006 for windows Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp Modified: cfe/trunk/unittests/Basic/FileManagerTest.cpp URL:

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Thank, LGTM. A few NITs. Comment at: clangd/index/IndexAction.h:31 +std::function RefsCallback, +std::function IncludeGraphCallback = nullptr);

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

2018-11-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. Herald added a subscriber: yaxunl. Added new diagnostics when templates are instantiated with different address space from the one provided in definition. This also prevents deducing generic address space in pointer type of

[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

[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] 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

[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

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

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: ioeric. Also fixes a crash (see the added 'accessibility-crash.cpp' test). Repository: rC Clang https://reviews.llvm.org/D55124 Files: include/clang/Sema/Sema.h lib/Sema/CodeCompleteConsumer.cpp

[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() && +

[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

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

2018-11-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 176130. ebevhan added a comment. Rebased and addressed review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-bitfield-promotion.c

[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 comment. @JonasToth this is the `Lexer` based expression equality check I talked about in D54757#1311516 . The point of this patch is that the definition is a macro sure could be build dependent, but the macro name is not, so it

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

2018-11-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @arphaman, did you have a chance to run the tests? There's not rush, just wanted to know whether we have any data at all at how Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54630/new/ https://reviews.llvm.org/D54630

[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] 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] D55129: [CTU] Eliminate race condition in CTU lit tests

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 plan to introduce additional CTU related lit test. Since lit may run the tests in parallel, it is not safe to use the same directory (%T)

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

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55125#1314741 , @Szelethus wrote: > @JonasToth this is the `Lexer` based expression equality check I talked about > in D54757#1311516 . The point of > this patch is that the

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 176141. serge-sans-paille added a comment. Use generic ``from __future__ import `` line whenever it makes sense CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 Files:

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

2018-11-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, balazske, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Adding some more CTU list tests. E.g. to check if a construct is unsupported. We also slightly modify the handling of the return

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

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Thank you for the detailed review. I'll work on a patch and add you as reviewer once done (prob. on Monday though). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52879/new/ https://reviews.llvm.org/D52879

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

[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] 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

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

2018-11-30 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. In D52879#1311177 , @riccibruno wrote: > And moreover I believe this change is subtly incorrect for the following > reason: > The type that is passed into the constructor of the call expression is the > type > of the call

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-11-30 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. This makes sense to me. I'm don't know if there's a better property but I think this matches the intended use, so I think it is fine. Repository: rC Clang CHANGES SINCE LAST

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

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. LGTM, could you please run this check over real world code and check that there are no obvious false positives? Comment at: docs/clang-tidy/checks/bugprone-branch-clone.rst:10 + + .. code-block:: c++ + please do not indent the `..

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

2018-11-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. Only the test and your opinion on the `Optional` thing, If you want to keep it that way its fine. LGTM afterwards :) Comment at:

[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#1291348 , @rjmccall wrote: > In D53153#1289380 , @scott.linder > wrote: > > > I don't believe that is currently the case (the unrestricted linking of OCL > > code to OCL

r348006 - [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 09:10:11 2018 New Revision: 348006 URL: http://llvm.org/viewvc/llvm-project?rev=348006=rev Log: [clang] Fill RealPathName for virtual files. Summary: Absolute path information for virtual files were missing even if we have already stat'd the files. This patch

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176146. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55054/new/ https://reviews.llvm.org/D55054 Files:

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348006: [clang] Fill RealPathName for virtual files. (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D55054?vs=176146=176147#toc Repository: rC Clang

[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:

[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

[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

[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] 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

[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

[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:

[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

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=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] 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

[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:

[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

[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

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=rev Log: [analyzer] Deleting unnecessary test file That I really should've done in rC348031. Removed: cfe/trunk/test/Analysis/analyzer-config.cpp Removed:

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

2018-11-30 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp created this revision. dkrupp added reviewers: alexfh, aaron.ballman, gamesh411. dkrupp added a project: clang-tools-extra. Herald added subscribers: cfe-commits, Szelethus, rnkovacs. Do not warn for redundant conditional expressions when the true and false branches are expanded from

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

2018-11-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + ebevhan wrote: > rjmccall wrote: > > Hmm. So adding a signed integer to an unsigned fixed-point type always > > converts the integer to unsigned? That's

[clang-tools-extra] r348005 - [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri Nov 30 08:59:00 2018 New Revision: 348005 URL: http://llvm.org/viewvc/llvm-project?rev=348005=rev Log: [clangd] Populate include graph during static indexing action. Summary: This is the second part for introducing include hierarchy into index files produced by clangd.

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348005: [clangd] Populate include graph during static indexing action. (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176144. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54999/new/ https://reviews.llvm.org/D54999 Files:

[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

[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 176150. ilya-biryukov added a comment. - Add missed field init - Also fix access checks for member access with qualifiers Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55124/new/ https://reviews.llvm.org/D55124 Files:

[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] 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

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=rev Log: Reverting r347949-r347951 because they broke the test bots.

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.

[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

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] 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

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=rev Log: [ExprConstant] Try fixing __builtin_constant_p after D54355 (rC347417) Summary: Reinstate the original behavior (Success(false, E)) before D54355 when this branch is

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

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: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

[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

[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

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=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:

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=rev Log: [analyzer] Emit an error for invalid -analyzer-config inputs Differential Revision: https://reviews.llvm.org/D53280 Added:

[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, );

[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:

[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

[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/

[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

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=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: 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

[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

[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:

[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 , std::vector ) { v2.erase(v1.cbegin()); } In this example if `foo()` is analyzed as a top level function, the respective

[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}} +}

[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).

[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,

[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:

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

  1   2   3   >