summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-161-1/+0
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.NAKAMURA Takumi2014-07-161-0/+1
| | | | llvm-svn: 213148
* Don't accept qualified 'int' main return types in C++ or standard C modeAlp Toker2014-07-021-0/+2
| | | | | | | | | C++ [basic.start.main]p1: "It shall have a return type of type int" ISO C is also clear about this, so only accept 'int' with qualifiers in GNUMode C. llvm-svn: 212171
* Sema: Do not merge new decls with invalid, old declsDavid Majnemer2013-07-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sema::MergeFunctionDecl attempts merging two decls even if the old decl is invalid. This can lead to interesting circumstances where we successfully merge the decls but the result makes no sense. Take the following for example: template <typename T> int main(void); int main(void); Sema will not consider these to be overloads of the same name because main can't be overloaded, which means that this must be a redeclaration. In this case the templated decl is compatible with the non-templated decl allowing the Sema::CheckFunctionDeclaration machinery to move on and do bizarre things like setting the previous decl of a non-templated decl to a templated decl! The way I see it, we should just bail from MergeFunctionDecl if the old decl is invalid. This fixes PR16531. llvm-svn: 185779
* Sema: Fix a crash when main is redeclared as a function-template.David Majnemer2013-07-061-0/+9
| | | | | | | | | | This boils down to us sending invalid function decls to CheckFunctionDeclaration becauswe we did not consider that CheckMain could cause the decl to be invalid. Instead, interogate the new decl's main-validity and *then* send it over to get CheckFunctionDeclaration'd if it was still valid after calling CheckMain. llvm-svn: 185745
* PR15100: look through type sugar when determining whether we have one of theRichard Smith2013-01-291-0/+23
| | | | | | forms of 'main' which we accept as an extension. llvm-svn: 173758
* Fold tests for C++ 'main' into a single file.Richard Smith2013-01-291-0/+78
llvm-svn: 173756
OpenPOWER on IntegriCloud