FailedChanges

Summary

  1. [Parser] Warn when ScopeDepthOrObjCQuals overflows (details)
  2. [libc++] Validate the entire regex is consumed (details)
  3. [BPF] Add preserve_access_index attribute for record definition (details)
  4. Revert "[BPF] Add preserve_access_index attribute for record definition" (details)
  5. [Diagnostics] Try to improve warning message for -Wreturn-type (details)
Commit b9be5ce8f3e0e697a61ad16e2c669de6ea8f8739 by koraq
[Parser] Warn when ScopeDepthOrObjCQuals overflows
Before when the overflow occured an assertion was triggered. Now check
whether the maximum has been reached and warn properly.
This patch fixes the original submission of PR19607.
Differential Revision: https://reviews.llvm.org/D63975
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was addedclang/test/Parser/nested_function_prototype_overflow.cpp
The file was addedclang/test/Parser/nested_blocks_overflow.cpp
The file was modifiedclang/include/clang/AST/Decl.h
The file was addedclang/test/Parser/nested_lambda_overflow.cpp
Commit 27c4eaac8c066eb1f7c5ad26c6fbc3e78eded778 by koraq
[libc++] Validate the entire regex is consumed
This change would have warned about the bug found in D62451. No unit
tests since the exception should never throw.
Differential Revision: https://reviews.llvm.org/D62452
The file was modifiedlibcxx/src/regex.cpp
The file was modifiedlibcxx/include/regex
Commit 4a5aa1a7bf8b1714b817ede8e09cd28c0784228a by yhs
[BPF] Add preserve_access_index attribute for record definition
This patch introduced a new bpf specific attribute which can be added to
struct or union definition. For example,
struct s { ... } __attribute__((preserve_access_index));
union u { ... } __attribute__((preserve_access_index)); The goal is to
simplify user codes for cases where preserve access index happens for
certain struct/union, so user does not need to use clang
__builtin_preserve_access_index for every members.
The attribute has no effect if -g is not specified.
When the attribute is specified and -g is specified, any member access
defined by that structure or union, including array subscript access and
inner records, will be preserved through
__builtin_preserve_{array,struct,union}_access_index() IR intrinsics,
which will enable relocation generation in bpf backend.
The following is an example to illustrate the usage:
-bash-4.4$ cat t.c
#define __reloc__ __attribute__((preserve_access_index))
struct s1 {
   int c;
} __reloc__;
  struct s2 {
   union {
     struct s1 b[3];
   };
} __reloc__;
  struct s3 {
   struct s2 a;
} __reloc__;
  int test(struct s3 *arg) {
   return arg->a.b[2].c;
}
-bash-4.4$ clang -target bpf -g -S -O2 t.c
A relocation with access string "0:0:0:0:2:0" will be generated
representing access offset of arg->a.b[2].c.
forward declaration with attribute is also handled properly such that
the attribute is copied and populated in real record definition.
Differential Revision: https://reviews.llvm.org/D69759
The file was modifiedclang/lib/CodeGen/CGExpr.cpp
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-6.c
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-3.c
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-7.c
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-8.c
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/Sema/bpf-attr-preserve-access-index.c
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-5.c
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-2.c
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-4.c
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was addedclang/test/CodeGen/bpf-attr-preserve-access-index-1.c
Commit 9434360401218ae02aaea1fbb53a42bc3af2bc76 by yhs
Revert "[BPF] Add preserve_access_index attribute for record definition"
This reverts commit 4a5aa1a7bf8b1714b817ede8e09cd28c0784228a.
There are some other test failures. Investigate them first.
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-1.c
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-8.c
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-5.c
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-7.c
The file was removedclang/test/Sema/bpf-attr-preserve-access-index.c
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-4.c
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-2.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-3.c
The file was modifiedclang/lib/CodeGen/CGExpr.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was removedclang/test/CodeGen/bpf-attr-preserve-access-index-6.c
Commit 1da13237a41a4818005f18d3f0f6eb5bf6e46100 by Dávid Bolvanský
[Diagnostics] Try to improve warning message for -Wreturn-type
Summary: I agree with
https://easyaspi314.github.io/gcc-vs-clang.html?fbclid=IwAR1VA0qxiWVUusOQUv5z7JESS7ZpeJy-UqAI5mnJscofGLqXcqeErIUB2gU,
current warning message is not very good. We should try to improve it..
Reviewers: rsmith, aaron.ballman, easyaspi314
Reviewed By: aaron.ballman
Subscribers: arphaman, Quuxplusone, mehdi_amini, hiraditya, cfe-commits,
llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D69762
The file was modifiedclang/test/SemaCXX/attr-noreturn.cpp
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp
The file was modifiedclang/test/Driver/cc-log-diagnostics.c
The file was modifiedclang/test/Misc/serialized-diags-stable.c
The file was modifiedclang/test/SemaCXX/warn-missing-noreturn.cpp
The file was modifiedclang/test/Sema/block-return-1.c
The file was modifiedclang/test/Analysis/const-method-call.cpp
The file was modifiedclang/test/Index/warning-flags.c
The file was modifiedclang/test/SemaTemplate/late-parsing-eager-instantiation.cpp
The file was modifiedclang/test/Frontend/absolute-paths.c
The file was modifiedclang/test/Sema/freemain.c
The file was modifiedclang/test/Sema/return.c
The file was modifiedclang/test/Analysis/structured_bindings.cpp
The file was modifiedclang/test/SemaCXX/coreturn.cpp
The file was modifiedclang/test/Modules/redecl-merge.m
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp
The file was modifiedclang/test/PCH/late-parsed-instantiations.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/Sema/block-return-3.c
The file was modifiedclang/test/SemaCXX/return-noreturn.cpp