[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu

2022-12-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. LGTM Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139720/new/ https://reviews.llvm.org/D139720

[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu

2022-12-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I'm fine with handling the return for common as a separate change, if necessary. Is the error produced now because it passes back the incorrect option rather than quietly changing it to something appropriate as it did before? Repository: rG LLVM Github

[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu

2022-12-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a subscriber: hubert.reinterpretcast. jamieschmeiser added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/PPC.cpp:54 +auto TargetCPUName = llvm::StringSwitch(CPUName) + .Case("common", "generic") +

[PATCH] D139720: [clang][PPC] Checking Unknown Values Passed to -mcpu

2022-12-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser requested changes to this revision. jamieschmeiser added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Driver/ToolChains/Arch/PPC.cpp:54 +auto TargetCPUName = llvm::StringSwitch(CPUName) +

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135658/new/ https://reviews.llvm.org/D135658

[PATCH] D135658: demangle OptFunction trace names

2022-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Is the mode change on check-time-trace-sections.py intended? I did a count of python files under llvm-project and < 10% are 755. I'm not saying it is better one way or the other; I'm just ensuring it is intentional. Repository: rG LLVM Github Monorepo

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Yes, I agree it is incomplete (aside from being incorrect here :-) I've just been asking to ensure that my understanding of freeze is correct. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136284/new/

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D136284#3874614 , @nlopes wrote: > In D136284#3874596 , > @jamieschmeiser wrote: > >> In D136284#3874492 , @nikic wrote: >> >>> At

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser abandoned this revision. jamieschmeiser added a comment. I checked with a member of the C++ standards committee and he verified that comparing an uninitialized value against itself is, indeed, undefined behaviour, in the general case. I am abandoning this revision. Repository:

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D136284#3874492 , @nikic wrote: > At least in C++, working with uninitialized memory is pretty much always > immediate undefined behavior, see https://eel.is/c++draft/basic.indet for the > relevant wording. The only

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D136284#3869216 , @nikic wrote: > The current behavior here is intentional -- in fact, LLVM will move towards > returning poison for loads from uninitialized memory in the future (though > precisely how this will

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D136284#3869306 , @nlopes wrote: >> However, multiple loads of the same memory must be equal > > This premise is incorrect w.r.t. with current semantics, which say that loads > return undef for uninit memory. > > As

[PATCH] D136284: SROA should freeze undefs for loads with no prior stores

2022-10-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: nikic, tstellar. Herald added subscribers: nlopes, kosarev, kerbowa, hiraditya, arichardson, jvesely. Herald added a project: All. jamieschmeiser requested review of this revision. Herald added projects: clang, LLVM. Herald

[PATCH] D133662: [Clang] Change -ftime-trace storing path and support multiple compilation jobs

2022-09-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Great. Also, something you may want to consider, either as part of or after you land this code. This really is a specific instance of a more generic problem: setting up option handling for something that saves results in a file for each compilation. This is

[PATCH] D133662: [Clang] Change -ftime-trace storing path and support multiple compilation jobs

2022-09-18 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I had an email exchange with @dongjunduo about this situation. He was a GSoC student that @Whitney and I were mentoring for the past summer. He agrees that your approach is cleaner. There appears to be two parts to your work. First, you implemented the

[PATCH] D133662: [Clang] WIP: Change -ftime-trace storing path and support multiple compilation jobs

2022-09-13 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I'm a little confused as to what is being proposed here. Is this building on D131469 or is it an alternative? It seems that there are portions of the code from D131469 included in these

[PATCH] D133587: Loop names used in reporting can grow very large

2022-09-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e3ac7969039: Loop names used in reporting can grow very large (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D133587: Loop names used in reporting can grow very large

2022-09-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: Whitney, dongjunduo, aeubanks, MaskRay. Herald added subscribers: ormris, StephenFan, steven_wu, zzheng, hiraditya. Herald added a project: All. jamieschmeiser requested review of this revision. Herald added projects: clang,

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-09-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. If the source is specified with a partial path, I would expect the .json file to be in the same directory as the source, so dir1/f.C and dir2/f.C would result in dir1/f.json and dir2/f.json. But this can be a later

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-22 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4667 + // Whether `-ftime-trace` or `-ftime-trace=` are specified + if (!TimeTrace && !TimeTraceFile) return; + The return should be on the next line. Did you run this through

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Good progress. Comment at: clang/lib/Driver/Driver.cpp:97 #include "llvm/Support/raw_ostream.h" +#include #include This include isn't necessary. There are asserts already in the file so this is transitively included.

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. You should not have debugging information in code that is up for review. If this is debugging information that you plan to leave in for future purposes (which I doubt is the case here), you need to protect it so that it isn't active unless some option is set.

[PATCH] D128048: Add a new clang option "-ftime-trace="

2022-07-11 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128048/new/ https://reviews.llvm.org/D128048

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-24 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D128048#3607295 , @MaskRay wrote: > You may add `-ftime-trace=` instead of introducing a new spelling. I like this idea. There is an example of an optional argument on an option with -print-changed. Repository:

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-23 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/test/Driver/check-time-trace-path.cpp:5 +// RUN: | FileCheck %s + +// CHECK: "beginningOfTime": {{[0-9]{16},}} This test is the same as the one in check-time-trace.cpp except for the path feature.

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-22 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D128048#3601588 , @Whitney wrote: > In D128048#3601579 , > @jamieschmeiser wrote: > >> Can you please use git rebase -i to collapse all the changes into a single >> change?

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-22 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. Can you please use git rebase -i to collapse all the changes into a single change? If this isn't done, it is difficult to know what is being reviewed as the changes only show the differences since your last revision, not all of the changes. Repository: rG

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser requested changes to this revision. jamieschmeiser added a comment. This revision now requires changes to proceed. This is a good start. You should mention in the summary that when -c is not specified, the compiler is invoked with -o pointing at /tmp so the .json file will

[PATCH] D126816: Only issue warning for subtraction involving null pointers on live code paths

2022-06-03 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGefbf0136b410: Only issue warning for subtraction involving null pointers on live code paths (authored by jamieschmeiser). Repository: rG LLVM

[PATCH] D126816: Only issue warning for subtraction involving null pointers on live code paths

2022-06-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 433736. jamieschmeiser edited the summary of this revision. jamieschmeiser added a comment. Respond to review comments: add cpp test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126816/new/ https://reviews.llvm.org/D126816 Files:

[PATCH] D126816: Only issue warning for subtraction involving null pointers on live code paths

2022-06-01 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: anarazel, efriedma. Herald added a project: All. jamieschmeiser requested review of this revision. Herald added a project: clang. Change the warning produced for subtraction from (or with) a null pointer to only be produced

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc3c1826c310c: Set TargetCPUName for AIX to default to pwr7. (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 362760. jamieschmeiser added a comment. Respond to review comment: expand testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107063/new/ https://reviews.llvm.org/D107063 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D107063: Set TargetCPUName for AIX to default to pwr7.

2021-07-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: hubert.reinterpretcast, ZarkoCA, stevewan. jamieschmeiser requested review of this revision. Herald added a project: clang. Set the TargetCPUName for AIX to default to pwr7, removing the setting of it based on the major/minor

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-07-28 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @crownyanguan Why do you think this caused the linker to crash? It is a warning in the front end. Would it even be executed in your posted command? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-07-20 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG9cb00b9ecbe7: Reland Produce warning for performing pointer arithmetic on a null pointer. (authored by jamieschmeiser).

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-07-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. This was originally approved and landed on May 11th. I agreed to let it be reverted when it was discovered that some headers were triggering the warning. I reworked the code to not generate the warning when coming from system header files and also added option

[PATCH] D104420: thread_local support for AIX

2021-07-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG73840f9f8141: thread_local support for AIX (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D104420: thread_local support for AIX

2021-07-16 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 359336. jamieschmeiser added a comment. Respond to review comments: Change parameter name and tighten up conditions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files:

[PATCH] D104420: thread_local support for AIX

2021-07-15 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358974. jamieschmeiser added a comment. Respond to review comments, formatting: fix comments, add assertion, fix linkage, expand test to include body of generated function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358717. jamieschmeiser added a comment. Remove accidental inclusion CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenFunction.h

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2971 +isEmittedWithConstantInitializer(VD, true) && +!VD->needsDestruction(getContext())) { + // Emit a weak global function referring to the initialization function.

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358690. jamieschmeiser added a comment. Respond to review comments: update comments and make functions not weak CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files:

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358673. jamieschmeiser added a comment. Respond to review comments: create stub functions, return 0 from function and other fixes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files:

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-07-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 357970. jamieschmeiser added a comment. Respond to review comments: Update to tests to create common LINUX/AIX portions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files:

[PATCH] D104420: thread_local support for AIX

2021-07-06 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 356705. jamieschmeiser added a comment. Fix formatting problem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/ItaniumCXXABI.cpp

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-07-05 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @rsmith @thakis @efriedma If there are no more changes required, please approve. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list

[PATCH] D104420: thread_local support for AIX

2021-06-16 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: hubert.reinterpretcast, sfertile, cebowleratibm, DiggerLin, rsmith. jamieschmeiser requested review of this revision. Herald added a project: clang. Changes to support thread_local storage on AIX. The AIX linker will

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-06-16 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-06-07 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @rsmith I separated the C and C++ messages in response to your comments and changed the C++ message to state that "performing pointer subtraction with a null pointer may have undefined behavior" to address your concerns. Are you satisfied? @thakis, the warning

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-06-04 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-27 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. The reason I worded it with 'may' is because, in C++, nullptr - nullptr is defined. If the code is "nullptr - p" or "p - nullptr", it is only undefined behaviour when p is not nullptr, hence the 'may' part of the warning because this is not known at compile

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-27 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a reviewer: thakis. jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-25 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @thakis, can you please verify that the changes no longer affect the MS headers? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-05-20 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG136ced498ba8: When vector is found as a type or non-type id, check if it is really theā€¦ (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-20 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 346751. jamieschmeiser added a comment. Fix formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-05-20 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 346722. jamieschmeiser added a comment. Remove unnecessary tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100991/new/ https://reviews.llvm.org/D100991 Files: clang/lib/Parse/Parser.cpp clang/test/Parser/altivec-non-type-vector.c

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-05-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 346548. jamieschmeiser added a comment. Expand testing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100991/new/ https://reviews.llvm.org/D100991 Files: clang/lib/Parse/Parser.cpp clang/test/Parser/altivec-non-type-vector.c

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser requested review of this revision. jamieschmeiser added a comment. Significant changes made since previously accepted. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 346515. jamieschmeiser edited the summary of this revision. jamieschmeiser added a comment. As requested, I have added a new warning option -Wnull-pointer-subtraction (and added it to -Wextra) that does not trigger on system headers. In addition, I

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser reopened this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. Re-opening because it was reverted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. If this is a problem for you, please revert it and I will take a look when I return. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @thakis, I have some questions about your comments. Are you sure this is coming from a system header? The path that you gave has third_party as a directory in the path. If the warning were being triggered by code in a system header, I would have expected it to

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-05-11 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100991/new/ https://reviews.llvm.org/D100991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-11 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdfc1e31d49fe: Produce warning for performing pointer arithmetic on a null pointer. (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-06 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 343483. jamieschmeiser added a comment. Respond to review comments: add C++ test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/lib/Sema/SemaExpr.cpp

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-03 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-05-03 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 342540. jamieschmeiser added a comment. Limit tests to platform that supports altivec. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100991/new/ https://reviews.llvm.org/D100991 Files: clang/lib/Parse/Parser.cpp

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D100991: Fix parsing of vector keyword in presence of conflicting uses.

2021-04-21 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: rsmith, saar.raz. jamieschmeiser requested review of this revision. Herald added a project: clang. When vector is found as a type or non-type id, check if it is really the altivec vector token. Call TryAltiVecVectorToken when

[PATCH] D100231: [NewPM] Cleanup IR printing instrumentation

2021-04-15 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100231/new/ https://reviews.llvm.org/D100231

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 336828. jamieschmeiser added a comment. Fix indenting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/pointer-addition.c Index:

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 336567. jamieschmeiser added a comment. Respond to review comments: Do not issue warning for nullptr - nullptr in C++. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files:

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/test/Sema/pointer-addition.c:34 + f = (char*)(f - (char*)0); // expected-warning {{performing pointer arithmetic on a null pointer has undefined behavior}} + f = (char*)((char*)0 - (char*)0); // expected-warning

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/test/Sema/pointer-addition.c:34 + f = (char*)(f - (char*)0); // expected-warning {{performing pointer arithmetic on a null pointer has undefined behavior}} + f = (char*)((char*)0 - (char*)0); // expected-warning

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-09 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 336500. jamieschmeiser added a comment. Respond to review comments: add requested test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/lib/Sema/SemaExpr.cpp

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-04-08 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 336148. jamieschmeiser added a comment. Reformat to satisfy clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 Files: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/pointer-addition.c

[PATCH] D98798: Produce waring for performing pointer arithmetic on a null pointer.

2021-03-29 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added reviewers: rsmith, efriedma, hfinkel. jamieschmeiser added a comment. Added more reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D98798: Produce waring for performing pointer arithmetic on a null pointer.

2021-03-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I used formatting similar to the existing code, which is not what clang-format is expecting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D98798: Produce waring for performing pointer arithmetic on a null pointer.

2021-03-17 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added a reviewer: andrew.w.kaylor. jamieschmeiser requested review of this revision. Herald added a project: clang. Test and produce warning for subtracting a pointer from null or subtracting null from a pointer. Reuse existing warning that

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser accepted this revision. jamieschmeiser added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I previously saw unrelated changes showing up in the differences here but this no longer seems to be the case so that comment can be ignored. Comment at: llvm/include/llvm/IR/PassInstrumentation.h:126 + void addClassToPassName(StringRef

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I see you have made the requested changes (nit: clang-tidy complained about the capitalization of the function) but why are there so many other, unrelated changes shown? Is there a problem with the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-01 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. I agree that having the callbacks ask for the names is an improvement as it is cleaner and allows other callbacks to use this feature if desired. Generally, things look good. I have a couple of minor concerns mentioned in the code but I think it would be

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-10-27 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser requested changes to this revision. jamieschmeiser added a comment. This revision now requires changes to proceed. The changes are specific to -print-before and -print-after (which is the intended target and this work originated before -print-changed) but could the change be made