| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have special checks for BI_va_start in
Sema::CheckBuiltinFunctionCall, so setting the 't' flag for va_start in
Builtins.def disables semantic checking for it. That's not desired, and
IRGen crashes when it tries to generate a call to va_start that doesn't
have at least one argument.
Follow-up to r322573
Fixes PR36565
llvm-svn: 326622
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Combine the logic doing the ms_abi/sysv_abi checks into one function so
that each check and its logical opposite are near each other. Now we
don't need two Sema entry points for MS va_start and regular va_start.
Refactor the code that checks if the va_start caller is a function,
block, or obj-c method. We do this in three places, and they are all
buggy for variadic lambdas (PR32737). After this change, I have one
place to apply the functional fix.
NFC
llvm-svn: 301968
|
| |
|
|
|
|
|
|
|
|
| |
enumeration type to va_start().
The underlying type for an enumeration in C is either char, signed int, or unsigned int. In the case the underlying type is chosen to be char (such as when passing -fshort-enums or using __attribute__((packed)) on the enum declaration), the enumeration can result in undefined behavior. However, when the underlying type is signed int or unsigned int (or long long as an extension), there is no undefined behavior because the types are compatible. This patch silences diagnostics for the latter while retaining the diagnostics for the former.
This patch addresses PR29140.
llvm-svn: 281632
|
| |
|
|
|
|
| |
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/20061/steps/test/logs/stdio
llvm-svn: 281612
|
| |
|
|
|
|
|
|
| |
enumeration type to va_start(). The underlying type for an enumeration in C is either char, signed int, or unsigned int. In the case the underlying type is chosen to be char (such as when passing -fshort-enums or using __attribute__((packed)) on the enum declaration), the enumeration can result in undefined behavior. However, when the underlying type is signed int or unsigned int (or long long as an extension), there is no undefined behavior because the types are compatible. This patch silences diagnostics for the latter while retaining the diagnostics for the former.
This patch addresses PR29140.
llvm-svn: 281609
|
| |
|
|
|
|
|
|
| |
undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion.
This helps cover some more of the CERT secure coding rule EXP58-CPP. Pass an object of the correct type to va_start (https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start).
llvm-svn: 267338
|
| |
|
|
| |
llvm-svn: 266644
|
| |
|
|
| |
llvm-svn: 194197
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
designator" diagnostic with more correct and more human-friendly "cannot take
address of rvalue of type 'T'".
For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully
saying "cannot take address of rvalue of type '<overloaded function type>'".
For the case of &array_temporary, treat it just like a class temporary
(including allowing it as an extension); the existing diagnostic wording
for the class temporary case works fine.
llvm-svn: 174262
|
| |
|
|
|
|
| |
behavior. PR10201.
llvm-svn: 134926
|
| |
|
|
|
|
|
| |
- Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there
- Incomplete and abstract types are considered hard errors
llvm-svn: 132979
|
| |
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
| |
|
|
|
|
| |
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
|
| |
|
|
|
|
| |
extension warning.
llvm-svn: 70805
|
| |
|
|
| |
llvm-svn: 68435
|
| |
|
|
|
|
| |
va_lists for some reason. This fixes rdar://6726818
llvm-svn: 68434
|
| |
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
| |
|
|
|
|
| |
designating an object.
llvm-svn: 64371
|
| |
|
|
|
|
|
|
| |
builtins.
Also, a minor tweak to va_copy for consistency.
llvm-svn: 62574
|
| |
|
|
| |
llvm-svn: 61055
|
| |
|
|
|
|
| |
headers.
llvm-svn: 59419
|
| |
|
|
|
|
|
| |
fixes problems handling references of va_list, which happens on x86_64.
This fixes PR2841 and rdar://6252231
llvm-svn: 56809
|
| |
|
|
|
|
| |
implicit cast expr or a paren expr.
llvm-svn: 46950
|
|
|
new diags.
llvm-svn: 42917
|