[PATCH] D54878: [clangd] NFC: Eliminate the unused variable warning.

2018-11-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clangd/AST.cpp:98 // The name was empty, so present an anonymous entity. - if (auto *NS = llvm::dyn_cast(&ND)) + if (isa(&ND)) return "(anonymous

[PATCH] D54964: Add test about __builtin_constant_p

2018-11-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: rsmith, void, shafik. Herald added subscribers: cfe-commits, kristina. Repository: rC Clang https://reviews.llvm.org/D54964 Files: test/SemaCXX/constant-expression-cxx1y.cpp Index: test/SemaCXX/constant-expression-cxx1y.cpp ==

[PATCH] D54964: Add test about __builtin_constant_p

2018-11-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347895: Simplify the __builtin_constant_p test that was used to catch rC347417 failure (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D54964?vs=175543&id=175902#

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-12-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D53238#1318349 , @martell wrote: > Seems like a better solution than what I had in D37726 > . > I'm not sully sure on the naming so I think someone else should also sign > off on this. This

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/lit.cfg.py:99 +stdout=subprocess.PIPE, +stderr=subprocess.PIPE, +env={'LANG': 'C'}) If you don't need stderr, remove `stderr=subprocess.PIPE,` `subprocess.Popen followed by communicate()` ca

[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

2018-12-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/lit.cfg.py:101 +env={'LANG': 'C'}) +sout, serr = tar_version.communicate() +if 'GNU tar' in sout.decode(): LG, but `serr` can be replaced by `_` if it is not used. CHANGES SINCE LAST ACTION https

[PATCH] D55484: ComputeLineNumbers: delete SSE2 vectorization

2018-12-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: bkramer. Herald added a subscriber: cfe-commits. SSE2 vectorization was added in 2012, but it is 2018 now and I can't observe any performance boost with the existing _mm_movemask_epi8 or the following SSE4.2 (compiling with -msse4.2): __

[PATCH] D55484: ComputeLineNumbers: delete SSE2 vectorization

2018-12-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D55484#1324983 , @bkramer wrote: > The performance difference on preprocessing huge files was tiny back then, > doesn't surprise me that it disappeared. What did you test this on? I tested it on cat lib/Sema/*.cpp lib/Code

[PATCH] D55484: ComputeLineNumbers: delete SSE2 vectorization

2018-12-10 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348777: ComputeLineNumbers: delete SSE2 vectorization (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D56647: [WIP] [ELF] Implement --copy-dt-needed-entries

2019-03-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I read your https://blog.netbsd.org/tnf/entry/the_first_report_on_lld :) The chapter "Handling of indirect shared library dependencies" summarizes the transitive DT_NEEDED problem well. But do we have a convincing list of applications that really need this option to li

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2019-03-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. The DT_GNU_HASH objection is so strong that I think I have to abandon this. I can do nothing but to blame the original sysv hash is so bad (it may be unfair to blame it

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:563 + crtend = Args.hasArg(options::OPT_shared) || IsPIE || IsStaticPIE ? + "crtend_shared" : "crtend"; + CmdArgs.push_back(ToolChain.getCompilerRTArgString(

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:563 + crtend = Args.hasArg(options::OPT_shared) || IsPIE || IsStaticPIE ? + "crtend_shared" : "crtend"; + CmdArgs.push_back(ToolChain.getCompilerRTArgString(

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: juliehockett, aaron.ballman, alexfh. Herald added subscribers: cfe-commits, jsji, kbarton, nemanjai. Herald added a project: clang. -ignore specifies a list of PP callbacks to ignore. It cannot express a whitelist, which may be more useful th

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > A nonzero __dso_handle has to match the value passed to __cxa_atexit but a > zero __dso_handle matches every function registered. So it matters that DSO > fini calls use &__dso_handle to match their registrations for the dlclose case Yes, but this won't matter if we c

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 190936. MaskRay added a comment. Reflow string literal Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59296/new/ https://reviews.llvm.org/D59296 Files: docs/pp-trace.rst pp-trace/PPCallbacksTracker.cpp pp-

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 190935. MaskRay added a comment. Reflow comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59296/new/ https://reviews.llvm.org/D59296 Files: docs/pp-trace.rst pp-trace/PPCallbacksTracker.cpp pp-trace/

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 190937. MaskRay marked an inline comment as done. MaskRay added a comment. Update ReleaseNotes.rst Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59296/new/ https://reviews.llvm.org/D59296 Files: docs/ReleaseN

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D59296#1430813 , @aaron.ballman wrote: > I think the release notes should be updated to mention that a > previously-supported option has been removed and that there's a new option > available as a replacement; I don't think w

[PATCH] D59296: [pp-trace] Delete -ignore and add generalized -callbacks

2019-03-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @aaron.ballman Does the release note look good now? 😊 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59296/new/ https://reviews.llvm.org/D59296 ___ cfe-commits mailing list cfe-c

[PATCH] D59296: [pp-trace] Delete -ignore and add a new option -callbacks

2019-03-18 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 191075. MaskRay retitled this revision from "[pp-trace] Delete -ignore and add generalized -callbacks" to "[pp-trace] Delete -ignore and add a new option -callbacks". MaskRay edited the summary of this revision. MaskRay added a comment. Add a test with space

[PATCH] D59296: [pp-trace] Delete -ignore and add a new option -callbacks

2019-03-18 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356366: [pp-trace] Delete -ignore and add a new option -callbacks (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGE

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: dblaikie, echristo. Herald added subscribers: cfe-commits, jdoerfert, aprantl. Herald added a project: clang. Computed debug info level: -gsplit-dwarf -gmlt => 1 -gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 -gmlt -gsplit-dwarf => 2 -gm

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192585. MaskRay edited the summary of this revision. MaskRay added a comment. update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192586. MaskRay added a comment. dedent Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/split-debug.c Index: test/Driver/split

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192589. MaskRay edited the summary of this revision. MaskRay added a comment. Update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192637. MaskRay added a comment. Simplify comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/split-debug.c Index: test/D

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 4 inline comments as done. MaskRay added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3167 + // But -gsplit-dwarf is not a g_Group option, hence we have to check the + // order explicitly. If -gsplit-dwarf wins, we fix DebugInfoKind later.

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. In D59923#1446508 , @dblaikie wrote: > What's the general motivation for this work/changes? The current -gsplit-dwarf handling is a bit complex and the motivation is to make it less conf

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192770. MaskRay edited the summary of this revision. MaskRay added a comment. Handle -gsplit-dwarf= Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clan

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D59923#1447245 , @dblaikie wrote: > OK - could you include/describe which sets of options disable split-dwarf, > then? (adding that to the patch description along with the matrix of g1/2, > etc? I've already updated the desc

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 192777. MaskRay edited the summary of this revision. MaskRay added a comment. Update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59797: [COFF] Reduce the size of Chunk and SectionChunk, NFC

2019-04-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > this reduces the sum of heap allocations ... These numbers exclude memory > mapped files May I ask how you counted the memory usage minus memory mapped files? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59797/new/ https://reviews.llv

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > is that to imply that the first block all do not use split DWARF? The first block do not use split DWARF. > In a previous message I think you said that the only change was "-gmlt > -gsplit-dwarf -fno-split-dwarf-inlining => 1 (before) 2 (after)" - which I'm > not sur

[PATCH] D60409: [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D60409#1461579 , @phosek wrote: > Our Mac builders have started failing after this change with the following: > > [3145/3502] Building CXX object > tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o >

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 194672. MaskRay added a comment. Update the description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/split-debug.c Index: te

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > -gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 > > This last one currently produces split-dwarf (if there's any DWARF worth > splitting - if there are any subprogram descriptions, etc, otherwise it saves > the indirection and produces an empty .dwo file). Thanks

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 194673. MaskRay edited the summary of this revision. MaskRay added a comment. Update description Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 Files: lib/Driver/ToolChains/Clang.c

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Thank you for unifying `crtbegin{,S,T}.o` 😊 I hope Android people can make their `crtbegin*.o` files simpler, one day.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59264/new/ htt

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-16 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358544: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repositor

[PATCH] D59756: [clangd] Support dependent bases in type hierarchy

2019-04-21 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358866: [clangd] Support dependent bases in type hierarchy (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. You use `%clang` (clang driver) because the test needs `-internal-isystem $resource_dir/include/ppc_wrappers`. A default release build of llvm sets `LLVM_ENABLE_ASSERTIONS` to off, the clang driver defaults to `-fdiscard-value-names`. This caused the test to break. I ha

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. May I ask why the mmintrin.h emulation layer must be added to the clang resource directory? Why can't it be provided as a standalone library like https://github.com/intel/ARM_NEON_2_x86_SSE ? Will you add SSE/AVX/AVX512 emulation layer to the clang resource directory as

[PATCH] D59924: [PowerPC] [Clang] Port MMX intrinsics and basic test cases to Power

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/Headers/ppc_wrappers/mmintrin.h:3 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal This is not Ap

[PATCH] D61046: Fix compilation warnings when compiling with GCC 7.3

2019-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/trunk/include/llvm/BinaryFormat/ELF.h:878 enum : unsigned { + SHF_NONE, + `SHF_NONE` is not defined in `/usr/binclude/elf.h`. `(unsigned)SHF_ALLOC` is probably better. CHANGES SINCE LAST ACTION https://review

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @arphaman @jkorous @thakis I committed https://reviews.llvm.org/rL359428 to fix the following build error. Can one of you check if the test is still built? Thanks! (I don't have a Mac...) if config.clangd_xpc_support: AttributeError: Testing

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/lit.cfg.in:1 +@LIT_SITE_CFG_IN_HEADER@ +# This is a shim to run the gtest unittests in ../unittests using lit. thakis wrote: > thakis wrote: > > Every other LLVM project puts the

[PATCH] D61689: Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)

2019-05-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: compnerd, rsmith, echristo. Herald added a project: clang. Herald added a subscriber: cfe-commits. Since July 15, 2015 (binutils-gdb commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas --compress-debug-sections=zlib (gcc -

[PATCH] D52331: [Index] Report specialization bases as references when IndexImplicitInstantiation is true

2018-09-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: akyrtzi, arphaman. Herald added a subscriber: cfe-commits. template struct B {}; template struct D : B {}; // `B` was not reported as a reference This patch fixes this. Repository: rC Clang https://reviews.llvm.org/D52331 Files:

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp:275 +os << "sizeof(" << DstName << ")"; + else +os << "sizeof()"; Why can't this `else if` case be folded into the `strlcpy` case? There are lots

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: EricWF, mclow.lists. Herald added subscribers: libcxx-commits, cfe-commits, ldionne, christof. If ptr is a null pointer, no action shall occur. Repository: rCXX libc++ https://reviews.llvm.org/D52401 Files: src/new.cpp Index: src/ne

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 166625. MaskRay edited the summary of this revision. MaskRay added a comment. . Repository: rCXX libc++ https://reviews.llvm.org/D52401 Files: src/new.cpp Index: src/new.cpp === --- src/

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp:275 +os << "sizeof(" << DstName << ")"; + else +os << "sizeof()"; devnexen wrote: > MaskRay wrote: > > Why can't this `else if` case be folded int

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 166629. MaskRay edited the summary of this revision. MaskRay added a comment. Also remove the check for _aligned_free Repository: rCXX libc++ https://reviews.llvm.org/D52401 Files: src/new.cpp Index: src/new.cpp ==

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LG https://reviews.llvm.org/D49722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52331: [Index] Report specialization bases as references when IndexImplicitInstantiation is true

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342831: [Index] Report specialization bases as references when… (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52331 Files

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 166632. MaskRay edited the summary of this revision. MaskRay added a comment. Quote C89: "If ptr is a null pointer, no action occurs." Repository: rCXX libc++ https://reviews.llvm.org/D52401 Files: src/new.cpp Index: src/new.cpp =

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In https://reviews.llvm.org/D52401#1243054, @ldionne wrote: > Was this true pre-C11 too? If not, then this needs to be guarded by `#if > _LIBCPP_STD_VER >= 17`, because C++ is only on top of C11 in C++17 and above > (Marshall can double-check this). Thanks for the not

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: akyrtzi, arphaman. Herald added a subscriber: cfe-commits. This makes BindingDecl's of the same name have different USRs, so that references can be correctly attributed. int a[1] = {}; { auto [x] = a; x; } { auto [x] = a; x; } Repos

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rCXX libc++ https://reviews.llvm.org/D52401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52446: Remove Found.clear() to silent bugprone-use-after-move after rC342925

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: rsmith. Herald added a subscriber: cfe-commits. MaskRay added a reviewer: clang. Repository: rC Clang https://reviews.llvm.org/D52446 Files: lib/Sema/SemaStmt.cpp Index: lib/Sema/SemaStmt.cpp =

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342936: Remove redundant null pointer check in operator delete (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52401 Files:

[PATCH] D52446: Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 166806. MaskRay retitled this revision from "Remove Found.clear() to silent bugprone-use-after-move after rC342925" to "Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925". MaskRay removed a review

[PATCH] D52446: Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925

2018-09-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 166805. MaskRay added a comment. Depends on https://reviews.llvm.org/D52451 (adding LLVM_ATTRIBUTE_REINITIALIZES) Repository: rC Clang https://reviews.llvm.org/D52446 Files: include/clang/Sema/Lookup.h Index: include/clang/Sema/Lookup.h =

[PATCH] D52446: Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence bugprone-use-after-move after rC342925

2018-09-25 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342950: Annotate LookupResult::clear() as LLVM_ATTRIBUTE_REINITIALIZES to silence… (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D52446?vs=166806&id=166824#toc

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: rsmith, arphaman. Herald added subscribers: cfe-commits, jfb. Currently the switch conditions display Decl nodes with space-separated lowercase words. Some conditions are missing and will cause llvm_unreachable() failure. It is simpler to j

[PATCH] D50294: [Driver] Use -gdwarf-3 by default for FreeBSD

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In https://reviews.llvm.org/D50294#1245454, @emaste wrote: > I'm using this change: > https://github.com/emaste/freebsd/commit/1c3deab6d518feb1a7e88de5b342a139e4022a21 > > In FreeBSD 12 and later we use Clang, lld, and ELF Tool Chain. (We still have > gas and objdump fr

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: rsmith. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang. The convenience wrapper in STLExtras is available since https://reviews.llvm.org/rL342102. Repository: rC Clang https://reviews.llvm.org/D52576 Files: lib/AS

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167206. MaskRay added a comment. Reflow nearby statements as rsmith@ requested: git diff -U0 --no-color 'HEAD^' | ~/llvm/tools/clang/tools/clang-format/clang-format-diff.py -i -p1 Repository: rC Clang https://reviews.llvm.org/D52576 Files: lib/AST/It

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343147: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52576 Fil

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-09-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D52445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I just checked an extremely old version of glibc fetched from https://ftp.gnu.org/pub/gnu/glibc/ glibc-2.0.1.tar.gz 1997-02-04 03:003.7M `malloc/malloc.c` #if __STD_C void fREe(Void_t* mem) #else void fREe(mem) Void_t* mem; #endif { arena *

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > I seem to recall a problem with that I would like to know if your impression came from the common PWN technique when the attacker found a heap buffer overflow :) Repository: rL LLVM https://reviews.llvm.org/D52401 ___

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343503: Remove redundant null pointer check in operator delete (authored by MaskRay, committed by ). Repository: rL LLVM https://reviews.llvm.org/D52401 Files: libcxx/trunk/src/new.cpp Index: libc

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. A gentle ping :) Repository: rC Clang https://reviews.llvm.org/D52529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167836. MaskRay added a comment. Delete -print-decl-contexts Repository: rC Clang https://reviews.llvm.org/D52529 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/ASTConsumers.h include/clang/Frontend/FrontendOptions.h lib/Fronten

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167837. MaskRay retitled this revision from "[Frontend] Simplify -print-decl-contexts with DeclNodes.inc" to "[Frontend] Delete -print-decl-contexts". MaskRay edited the summary of this revision. MaskRay removed a reviewer: clang. MaskRay added a comment. .

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167842. MaskRay added a comment. Coverage/ast-printing.{c,cpp} contain other dumping tests. Don't delete them Repository: rC Clang https://reviews.llvm.org/D52529 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/ASTConsumers.h inclu

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 3 inline comments as done. MaskRay added a comment. In https://reviews.llvm.org/D52529#1251760, @rsmith wrote: > Looks good to me. Please first mail cfe-dev announcing this change and wait a > day or so for anyone using this feature to speak up before committing. Thanks! Sent ou

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-02 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343660: [Frontend] Delete -print-decl-contexts (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52529?vs=167842&id=168070

[PATCH] D52853: [Analyzer] Try fixing ConstraintManager::assumeDual

2018-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: NoQ, george.karpenkov, dcoughlin. Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, a.sidorin, JDevlieghere, szepet, xazax.hun. This fixes test/Analysis/trustnonnullchecker_test.m in Debug mode. Repository: rC Clang htt

[PATCH] D52848: [analyzer] Do not crash if the assumption added in TrustNonNullChecker is enough to make the state unfeasible

2018-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This change appears to break `test/Analysis/trustnonnullchecker_test.m` in non-optimized (__OPTIMIZE__ not defined) mode. Can you take a look? Repository: rC Clang https://reviews.llvm.org/D52848 ___ cfe-commits mailing

[PATCH] D52853: [Analyzer] Try fixing ConstraintManager::assumeDual

2018-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In https://reviews.llvm.org/D52853#1254486, @NoQ wrote: > This should have been fixed by https://reviews.llvm.org/D52848. > > This is a very important fundamental assertion, we definitely should not > remove it. Sorry I don't understand the code at all but I get a diff

[PATCH] D52853: [Analyzer] Try fixing ConstraintManager::assumeDual

2018-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Thanks for your prompt response https://reviews.llvm.org/rC343747 . I'll abandon this revision! Repository: rC Clang https://reviews.llvm.org/D52853 ___ cfe-commits mailing list cfe-commi

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 168486. MaskRay added a comment. Add test to Core/index-source.cpp Repository: rC Clang https://reviews.llvm.org/D52445 Files: lib/Index/USRGeneration.cpp test/Index/Core/index-source.cpp Index: test/Index/Core/index-source.cpp

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: include/clang/Basic/TargetOptions.h:72 + // The code model to be used as specified by the user. Corresponds to + // Model enum defined in include/llvm/Support/CodeGen.h, plus "default" for + // the case when the user has not explicitl

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/Preprocessor/init.c:7992 +// +// RUN: %clang -xc - -E -dD -mcmodel=medium --target=i386-unknown-linux < /dev/null | FileCheck -match-full-lines -check-prefix X86_MEDIUM %s +// X86_MEDIUM:#define __code_model_medium_ 1 -

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/Basic/Targets/X86.cpp:865 + if (CodeModel == "default") +// When the user has not explicitly specified anything, +// the default code model to use is small. I'm not sure if the comment is useful here... or y

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-10-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 168704. MaskRay added a comment. Use isLocal Repository: rC Clang https://reviews.llvm.org/D52445 Files: lib/Index/USRGeneration.cpp test/Index/Core/index-source.cpp Index: test/Index/Core/index-source.cpp ==

[PATCH] D52937: [clangd] Add clangd.serverInfo command to inspect server state.

2018-10-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Rather than use a `workspace/executeCommand` command, you may consider making it a custom request message whose method name starts with `$/` https://microsoft.github.io/language-server-protocol/specification > Notification and requests whose methods start with ‘$/’ are

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-10-08 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344010: [Index] Use locations to uniquify function-scope BindingDecl USR (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D52445?vs=168704&id=168740#toc Repositor

[PATCH] D57556: Fix for -DBUILD_SHARED_LIBS=ON build after rL352803

2019-02-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry I didn't notice this. D57345 has been fixed in rC352872 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57556/new/ https://reviews.llvm.org/D57556 _

[PATCH] D62606: [Driver] -static-pie: add -z text

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362050: [Driver] -static-pie: add -z text (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION ht

[PATCH] D59185: [PowerPC] Set the default PLT mode on musl to Secure PLT

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362051: [PowerPC] Set the default PLT mode on musl to Secure PLT (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: htt

[PATCH] D62509: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 202103. MaskRay retitled this revision from "[Driver] Render -fuse-init-array for -fembed-bitcode" to "[Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode". MaskRay edited the summary of this revision. MaskRay added a comment. Add hexa

[PATCH] D62509: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode

2019-05-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC362052: [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcode (authored by MaskRay, committed by ). Changed prior to commit: https://reviews.llvm.org/D62509?vs=202103&id=202105#toc

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/CMakeLists.txt:58 clangDriver + clangIndex clangEdit This is a layering issue. clangIndex depends on clangFrontend so clangFrontend should not depend on clangIndex. The circular dependency

[PATCH] D60974: Clang IFSO driver action.

2019-06-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:22 + StringRef Format; + std::set ParsedTemplates; + Does `StringSet<>` work? Comment at: cfe/trunk/lib/Frontend/InterfaceStubFunctionsConsum

<    1   2   3   4   5   6   7   8   9   10   >