// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-objc-root-class -Wdocumentation -Wdocumentation-pedantic -verify %s
// RUN: %clang_cc1 -xobjective-c++ -fsyntax-only -fblocks -Wno-objc-root-class -Wdocumentation -Wdocumentation-pedantic -verify %s
@class NSString;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
int a;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
int b;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef int ;
// rdar://13094352
// expected-warning@+2 {{'@method' command should be used in a comment attached to an Objective-C method declaration}}
// rdar://12379114
// expected-warning@+5 {{'@interface' command should not be used in a comment attached to a non-interface declaration}}
// expected-warning@+5 {{'@classdesign' command should not be used in a comment attached to a non-container declaration}}
// expected-warning@+5 {{'@coclass' command should not be used in a comment attached to a non-container declaration}}
/*!
@interface IOCommandGate
@classdesign Multiple paragraphs go here.
@coclass myCoClass
*/
typedef id OBJ;
// rdar://12379114
// expected-warning@+4 {{'@methodgroup' command should be used in a comment attached to an Objective-C method declaration}}
// expected-warning@+6 {{'@method' command should be used in a comment attached to an Objective-C method declaratio}}
// expected-warning@+2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
/*!
@protocol PROTO
*/
;
/*!
@interface NSArray This is an array
*/
@class NSArray;
// expected-warning@+3 {{unknown command tag name}}
/*!
@interface NSMutableArray
@super NSArray
*/
/*!
@protocol MyProto
*/
// expected-warning@+2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
/*!
@protocol MyProto
*/
// expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
/*!
@struct S1 THIS IS IT
*/
// expected-warning@+1 {{unknown command tag name}}
/// \t bbb IS_DOXYGEN_END
int ;
// rdar://13836387
/** \brief Module handling the incoming notifications from the system.
*
* This includes:
* - Network Reachability
* - Power State
* - Low Disk
*/
// rdar://13927330
/// @class Asset <- '@class' may be used in a comment attached to a an interface declaration
// rdar://14024851 Check that this does not enter an infinite loop
// rdar://14124644
/**
* blockPointerVariable
*
* @param i is integer.
* @returns integer.
*/
;
;
// expected-warning@+5 {{parameter 'p' not found in the function declaration}}
// expected-warning@+5 {{'\returns' command used in a comment that is attached to a function returning void}}
/**
* functionPointerVariable
*
* \param p not here.
* \returns integer.
*/
;
/*!
* Block typedef with variadic params.
*
* @param a
* works
*
* @param ...
* now should work too.
*/
typedef void ;
// PR42844 - Assertion failures when using typedefed block pointers
typedef void;
typedef VoidBlockType ;
VoidBlockTypeCall *d; ///< \return none
// expected-warning@-1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
VoidBlockTypeCall ^e; ///< \return none
// expected-warning@-1 {{'\return' command used in a comment that is not attached to a function or method declaration}}