summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/implicit-decl.c
Commit message (Collapse)AuthorAgeFilesLines
* PR34822: Fix a collection of related bugs with our handling of C89 implicit ↵Richard Smith2017-10-041-2/+2
| | | | | | | | | | | | | | | | | function declarations. We were injecting the function into the wrong semantic context, resulting in it failing to be registered as a global for redeclaration lookup. As a consequence, we accepted invalid code since r310616. Fixing that resulted in the "out-of-scope declaration" diagnostic firing a lot more often. It turned out that warning codepath was non-conforming, because it did not cause us to inject the implicitly-declared function into the enclosing block scope. We now only warn if the type of the out-of-scope declaration doesn't match the type of an implicitly-declared function; in all other cases, we produce the normal warning for an implicitly-declared function. llvm-svn: 314871
* Place implictly declared functions at block scopeMomchil Velikov2017-08-101-3/+2
| | | | | | | | | | | | Such implicitly declared functions behave as if the enclosing block contained the declaration extern int name() (C90, 6.3.3.2 Function calls), thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers). This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224 Differential Revision: https://reviews.llvm.org/D33676 llvm-svn: 310616
* Convert SemaDecl.cpp to pass callback objects to CorrectTypo.Kaelyn Uhrain2012-01-181-2/+10
| | | | | | | | | | | | Includes tests highlighting the cases where accuracy has improved (there is one call that does no filtering beyond selecting the set of allowed keywords, and one call that only triggers for ObjC code for which a test by someone who knows ObjC would be welcome). Also fixes a small typo in one of the suggestion messages, and drops a malformed "expected-note" for a suggestion that did not occur even when the malformed note was committed as r145930. llvm-svn: 148420
* Only do typo correction for implicit function decls whenHans Wennborg2011-12-081-3/+3
| | | | | | | | | | they are treated as errors. Doing typo correction when these are just warnings slows down the compilation of source which deliberately uses implicit function declarations. llvm-svn: 146153
* Suggest typo corrections for implicit function declarations.Hans Wennborg2011-12-061-1/+8
| | | | | | | A mistyped function call becomes an inmplicit function declaration in C. Suggest typo correction when one can be found. llvm-svn: 145930
* fix PR7280 by making the warning on code like this:Chris Lattner2010-07-111-1/+0
| | | | | | | | | | int test1() { return; } default to an error. llvm-svn: 108108
* add a bunch of missing prototypes to testsChris Lattner2010-01-091-1/+2
| | | | llvm-svn: 93072
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Merge function-return.c into function.cChris Lattner2008-12-181-1/+1
| | | | | | | Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" llvm-svn: 61187
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-1/+1
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Add explicit support for diagnosing implicit function decls.Steve Naroff2008-04-041-0/+17
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well. llvm-svn: 49214
OpenPOWER on IntegriCloud